Class ResourceServiceImpl
java.lang.Object
org.apache.syncope.core.rest.cxf.service.AbstractService
org.apache.syncope.core.rest.cxf.service.ResourceServiceImpl
- All Implemented Interfaces:
JAXRSService
,ResourceService
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(ResourceTO resourceTO) Checks whether the connection to resource could be established.create
(ResourceTO resourceTO) Creates a new resource.void
Deletes the resource matching the given name.getConnObjectKeyValue
(String key, String anyTypeKey, String anyKey) Returns the calculated connObjectKey value for the given type and key.list()
Returns a list of all resources.Returns the resource with matching name.readConnObject
(String key, String anyTypeKey, String value) Returns connector object from the external resource, for the given type and key.void
removeSyncToken
(String key, String anyTypeKey) Removes the sync token value associated to the given any type from the given resource.searchConnObjects
(String key, String anyTypeKey, ConnObjectTOQuery query) Returns a paged list of connector objects from external resource, for the given type, matching page/size conditions.void
setLatestSyncToken
(String key, String anyTypeKey) Queries the connector underlying the given resource for the latest sync token value associated to the given any type and stores the value internally, for later usage.void
update
(ResourceTO resourceTO) Updates the resource matching the given name.Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getPreference, isNullPriorityAsync, modificationResponse, pageable, pageable, sort
-
Field Details
-
logic
-
-
Constructor Details
-
ResourceServiceImpl
-
-
Method Details
-
create
Description copied from interface:ResourceService
Creates a new resource.- Specified by:
create
in interfaceResourceService
- Parameters:
resourceTO
- Resource to be created- Returns:
- Response object featuring Location header of created resource
-
update
Description copied from interface:ResourceService
Updates the resource matching the given name.- Specified by:
update
in interfaceResourceService
- Parameters:
resourceTO
- resource to be stored
-
setLatestSyncToken
Description copied from interface:ResourceService
Queries the connector underlying the given resource for the latest sync token value associated to the given any type and stores the value internally, for later usage.- Specified by:
setLatestSyncToken
in interfaceResourceService
- Parameters:
key
- resourceanyTypeKey
- any type
-
removeSyncToken
Description copied from interface:ResourceService
Removes the sync token value associated to the given any type from the given resource.- Specified by:
removeSyncToken
in interfaceResourceService
- Parameters:
key
- resourceanyTypeKey
- any type
-
delete
Description copied from interface:ResourceService
Deletes the resource matching the given name.- Specified by:
delete
in interfaceResourceService
- Parameters:
key
- name of resource to be deleted
-
read
Description copied from interface:ResourceService
Returns the resource with matching name.- Specified by:
read
in interfaceResourceService
- Parameters:
key
- Name of resource to be read- Returns:
- resource with matching name
-
list
Description copied from interface:ResourceService
Returns a list of all resources.- Specified by:
list
in interfaceResourceService
- Returns:
- list of all resources
-
getConnObjectKeyValue
Description copied from interface:ResourceService
Returns the calculated connObjectKey value for the given type and key.- Specified by:
getConnObjectKeyValue
in interfaceResourceService
- Parameters:
key
- name of resource to read connector object fromanyTypeKey
- any object typeanyKey
- user, group or any object key- Returns:
- connObjectKey value for the external resource, for the given type and key
-
readConnObject
Description copied from interface:ResourceService
Returns connector object from the external resource, for the given type and key.- Specified by:
readConnObject
in interfaceResourceService
- Parameters:
key
- name of resource to read connector object fromanyTypeKey
- any object typevalue
- if value looks like a UUID then it is interpreted as user, group or any object key, otherwise as key value on the resource- Returns:
- connector object from the external resource, for the given type and key
-
searchConnObjects
public PagedConnObjectResult searchConnObjects(String key, String anyTypeKey, ConnObjectTOQuery query) Description copied from interface:ResourceService
Returns a paged list of connector objects from external resource, for the given type, matching page/size conditions.- Specified by:
searchConnObjects
in interfaceResourceService
- Parameters:
key
- name of resource to read connector object fromanyTypeKey
- any object typequery
- query conditions- Returns:
- connector objects from the external resource, for the given type
-
check
Description copied from interface:ResourceService
Checks whether the connection to resource could be established.- Specified by:
check
in interfaceResourceService
- Parameters:
resourceTO
- resource to be checked
-