java.lang.Object
org.apache.syncope.core.rest.cxf.service.AbstractService
org.apache.syncope.core.rest.cxf.service.AbstractSearchService
org.apache.syncope.core.rest.cxf.service.AbstractAnyService<TO,CR,UR>
- All Implemented Interfaces:
AnyService<TO>
,JAXRSService
- Direct Known Subclasses:
AnyObjectServiceImpl
,GroupServiceImpl
,UserServiceImpl
public abstract class AbstractAnyService<TO extends AnyTO,CR extends AnyCR,UR extends AnyUR>
extends AbstractSearchService
implements AnyService<TO>
-
Field Summary
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractSearchService
searchCondVisitor
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 TypeMethodDescriptionprotected void
addUpdateOrReplaceAttr
(String key, SchemaType schemaType, Attr attrTO, PatchOperation operation) associate
(ResourceAR req) Executes resource-related operations on given entity.deassociate
(ResourceDR req) Executes resource-related operations on given entity.Deletes any object matching provided key.void
delete
(String key, SchemaType schemaType, String schema) Deletes the attribute, owned by the given any object, for the given schema type and schema.protected Response
protected OffsetDateTime
findLastChange
(String key) protected abstract AnyDAO
<?> protected abstract AbstractAnyLogic
<TO, CR, UR> protected abstract UR
newUpdateReq
(String key) Reads the any object matching the provided key.read
(String key, SchemaType schemaType) Reads the list of attributes owned by the given any object for the given schema type.read
(String key, SchemaType schemaType, String schema) Reads the attribute, owned by the given any object, for the given schema type and schema.Returns a paged list of any objects matching the given query.update
(String key, SchemaType schemaType, Attr attrTO) Adds or replaces the attribute, owned by the given any object, for the given schema type and schema.Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractSearchService
getSearchCond
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getPreference, isNullPriorityAsync, modificationResponse, pageable, pageable, sort
-
Constructor Details
-
AbstractAnyService
-
-
Method Details
-
getAnyDAO
-
getAnyLogic
-
newUpdateReq
-
read
Description copied from interface:AnyService
Reads the list of attributes owned by the given any object for the given schema type. Note that for the UserService, GroupService and AnyObjectService subclasses, if the key parameter looks like a UUID then it is interpreted as as key, otherwise as a (user)name.- Specified by:
read
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- any object key or nameschemaType
- schema type- Returns:
- list of attributes, owned by the given any object, for the given schema type
-
read
Description copied from interface:AnyService
Reads the attribute, owned by the given any object, for the given schema type and schema. Note that for the UserService, GroupService and AnyObjectService subclasses, if the key parameter looks like a UUID then it is interpreted as as key, otherwise as a (user)name.- Specified by:
read
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- any object key or nameschemaType
- schema typeschema
- schema- Returns:
- attribute, owned by the given any object, for the given schema type and schema
-
read
Description copied from interface:AnyService
Reads the any object matching the provided key.- Specified by:
read
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- if value looks like a UUID then it is interpreted as key, otherwise as a (user)name- Returns:
- any object with matching key
-
search
Description copied from interface:AnyService
Returns a paged list of any objects matching the given query.- Specified by:
search
in interfaceAnyService<TO extends AnyTO>
- Parameters:
anyQuery
- query conditions- Returns:
- paged list of any objects matching the given query
-
findLastChange
-
doUpdate
-
addUpdateOrReplaceAttr
protected void addUpdateOrReplaceAttr(String key, SchemaType schemaType, Attr attrTO, PatchOperation operation) -
update
Description copied from interface:AnyService
Adds or replaces the attribute, owned by the given any object, for the given schema type and schema.- Specified by:
update
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- any object key or nameschemaType
- schema typeattrTO
- attribute- Returns:
- Response object featuring the updated any object attribute - as Entity
-
delete
Description copied from interface:AnyService
Deletes the attribute, owned by the given any object, for the given schema type and schema.- Specified by:
delete
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- any object key or nameschemaType
- schema typeschema
- schema
-
delete
Description copied from interface:AnyService
Deletes any object matching provided key.- Specified by:
delete
in interfaceAnyService<TO extends AnyTO>
- Parameters:
key
- any object key or name- Returns:
- Response object featuring the deleted any object enriched with propagation status information
-
deassociate
Description copied from interface:AnyService
Executes resource-related operations on given entity.- Specified by:
deassociate
in interfaceAnyService<TO extends AnyTO>
- Parameters:
req
- external resources to be used for propagation-related operations- Returns:
- batch results as Response entity
-
associate
Description copied from interface:AnyService
Executes resource-related operations on given entity.- Specified by:
associate
in interfaceAnyService<TO extends AnyTO>
- Parameters:
req
- external resources to be used for propagation-related operations- Returns:
- batch results as Response entity
-