Class ConnectorServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.ConnectorServiceImpl
-
- All Implemented Interfaces:
ConnectorService,JAXRSService
@Service public class ConnectorServiceImpl extends AbstractService implements ConnectorService
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectorLogiclogic-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description ConnectorServiceImpl(ConnectorLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ConnIdObjectClass>buildObjectClassInfo(ConnInstanceTO connInstanceTO, boolean includeSpecial)Builds the list of ConnId object classes information for the connector bundle matching the given connector instance key, with the provided configuration.voidcheck(ConnInstanceTO connInstanceTO)Checks whether the connection to resource could be established.javax.ws.rs.core.Responsecreate(ConnInstanceTO connInstanceTO)Creates a new connector instance.voiddelete(String key)Deletes the connector instance matching the provided key.List<ConnIdBundle>getBundles(String lang)Returns available connector bundles with property keys in selected language.List<ConnInstanceTO>list(String lang)Returns a list of all connector instances with property keys in the matching language.ConnInstanceTOread(String key, String lang)Returns connector instance with matching key.ConnInstanceTOreadByResource(String resourceName, String lang)Returns connector instance for matching resource.voidreload()Reload all connector bundles and instances.voidupdate(ConnInstanceTO connInstanceTO)Updates the connector instance matching the provided key.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
-
-
-
Field Detail
-
logic
protected final ConnectorLogic logic
-
-
Constructor Detail
-
ConnectorServiceImpl
public ConnectorServiceImpl(ConnectorLogic logic)
-
-
Method Detail
-
create
public javax.ws.rs.core.Response create(ConnInstanceTO connInstanceTO)
Description copied from interface:ConnectorServiceCreates a new connector instance.- Specified by:
createin interfaceConnectorService- Parameters:
connInstanceTO- connector instance to be created- Returns:
- Response object featuring Location header of created connector instance
-
delete
public void delete(String key)
Description copied from interface:ConnectorServiceDeletes the connector instance matching the provided key.- Specified by:
deletein interfaceConnectorService- Parameters:
key- connector instance key to be deleted
-
getBundles
public List<ConnIdBundle> getBundles(String lang)
Description copied from interface:ConnectorServiceReturns available connector bundles with property keys in selected language.- Specified by:
getBundlesin interfaceConnectorService- Parameters:
lang- language to select property keys; default language is English- Returns:
- available connector bundles with property keys in selected language
-
buildObjectClassInfo
public List<ConnIdObjectClass> buildObjectClassInfo(ConnInstanceTO connInstanceTO, boolean includeSpecial)
Description copied from interface:ConnectorServiceBuilds the list of ConnId object classes information for the connector bundle matching the given connector instance key, with the provided configuration.- Specified by:
buildObjectClassInfoin interfaceConnectorService- Parameters:
connInstanceTO- connector instance object providing configuration propertiesincludeSpecial- if set to true, special schema names (like '__PASSWORD__') will be included; default is false- Returns:
- supported object classes info for the connector bundle matching the given connector instance key, with the provided configuration
-
list
public List<ConnInstanceTO> list(String lang)
Description copied from interface:ConnectorServiceReturns a list of all connector instances with property keys in the matching language.- Specified by:
listin interfaceConnectorService- Parameters:
lang- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- list of all connector instances with property keys in the matching language
-
read
public ConnInstanceTO read(String key, String lang)
Description copied from interface:ConnectorServiceReturns connector instance with matching key.- Specified by:
readin interfaceConnectorService- Parameters:
key- connector instance key to be readlang- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- connector instance with matching key
-
readByResource
public ConnInstanceTO readByResource(String resourceName, String lang)
Description copied from interface:ConnectorServiceReturns connector instance for matching resource.- Specified by:
readByResourcein interfaceConnectorService- Parameters:
resourceName- resource name to be used for connector lookuplang- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- connector instance for matching resource
-
update
public void update(ConnInstanceTO connInstanceTO)
Description copied from interface:ConnectorServiceUpdates the connector instance matching the provided key.- Specified by:
updatein interfaceConnectorService- Parameters:
connInstanceTO- connector instance to be stored
-
check
public void check(ConnInstanceTO connInstanceTO)
Description copied from interface:ConnectorServiceChecks whether the connection to resource could be established.- Specified by:
checkin interfaceConnectorService- Parameters:
connInstanceTO- connector instance to be used for connection check
-
reload
public void reload()
Description copied from interface:ConnectorServiceReload all connector bundles and instances.- Specified by:
reloadin interfaceConnectorService
-
-