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 ConnectorLogic
logic
-
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.void
check(ConnInstanceTO connInstanceTO)
Checks whether the connection to resource could be established.javax.ws.rs.core.Response
create(ConnInstanceTO connInstanceTO)
Creates a new connector instance.void
delete(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.ConnInstanceTO
read(String key, String lang)
Returns connector instance with matching key.ConnInstanceTO
readByResource(String resourceName, String lang)
Returns connector instance for matching resource.void
reload()
Reload all connector bundles and instances.void
update(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:ConnectorService
Creates a new connector instance.- Specified by:
create
in 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:ConnectorService
Deletes the connector instance matching the provided key.- Specified by:
delete
in interfaceConnectorService
- Parameters:
key
- connector instance key to be deleted
-
getBundles
public List<ConnIdBundle> getBundles(String lang)
Description copied from interface:ConnectorService
Returns available connector bundles with property keys in selected language.- Specified by:
getBundles
in 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:ConnectorService
Builds the list of ConnId object classes information for the connector bundle matching the given connector instance key, with the provided configuration.- Specified by:
buildObjectClassInfo
in 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:ConnectorService
Returns a list of all connector instances with property keys in the matching language.- Specified by:
list
in 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:ConnectorService
Returns connector instance with matching key.- Specified by:
read
in 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:ConnectorService
Returns connector instance for matching resource.- Specified by:
readByResource
in 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:ConnectorService
Updates the connector instance matching the provided key.- Specified by:
update
in interfaceConnectorService
- Parameters:
connInstanceTO
- connector instance to be stored
-
check
public void check(ConnInstanceTO connInstanceTO)
Description copied from interface:ConnectorService
Checks whether the connection to resource could be established.- Specified by:
check
in interfaceConnectorService
- Parameters:
connInstanceTO
- connector instance to be used for connection check
-
reload
public void reload()
Description copied from interface:ConnectorService
Reload all connector bundles and instances.- Specified by:
reload
in interfaceConnectorService
-
-