Class AbstractService
java.lang.Object
org.apache.syncope.core.rest.cxf.service.AbstractService
- All Implemented Interfaces:
JAXRSService
- Direct Known Subclasses:
AbstractExecutableService
,AbstractSearchService
,AccessTokenServiceImpl
,AnyTypeClassServiceImpl
,AnyTypeServiceImpl
,ApplicationServiceImpl
,AttrRepoServiceImpl
,AuditServiceImpl
,AuthModuleServiceImpl
,AuthProfileServiceImpl
,BpmnProcessServiceImpl
,ClientAppServiceImpl
,CommandServiceImpl
,ConnectorServiceImpl
,DelegationServiceImpl
,DynRealmServiceImpl
,FIQLQueryServiceImpl
,GoogleMfaAuthAccountServiceImpl
,GoogleMfaAuthTokenServiceImpl
,ImpersonationServiceImpl
,ImplementationServiceImpl
,MailTemplateServiceImpl
,MfaTrustStorageServiceImpl
,NotificationServiceImpl
,OIDCC4UIProviderServiceImpl
,OIDCC4UIServiceImpl
,OIDCJWKSServiceImpl
,PolicyServiceImpl
,RealmServiceImpl
,RelationshipTypeServiceImpl
,RemediationServiceImpl
,ResourceServiceImpl
,RoleServiceImpl
,SAML2IdPEntityServiceImpl
,SAML2SP4UIIdPServiceImpl
,SAML2SP4UIServiceImpl
,SAML2SPEntityServiceImpl
,SchemaServiceImpl
,SCIMConfServiceImpl
,SecurityQuestionServiceImpl
,SRARouteServiceImpl
,SyncopeServiceImpl
,UserRequestServiceImpl
,UserSelfServiceImpl
,UserWorkflowTaskServiceImpl
,WAClientAppServiceImpl
,WAConfigServiceImpl
,WebAuthnRegistrationServiceImpl
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Logger
protected org.apache.cxf.jaxrs.ext.MessageContext
protected static final String
protected org.apache.cxf.jaxrs.ext.search.SearchContext
protected 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 Response.ResponseBuilder
applyPreference
(ProvisioningResult<?> provisioningResult, Response.ResponseBuilder builder) protected <T extends BaseBean>
PagedResult<T> buildPagedResult
(org.springframework.data.domain.Page<T> page) Builds a paged result out of page.protected void
protected Response
createResponse
(ProvisioningResult<?> provisioningResult) Builds response to successfulcreate
request, taking into account anyPrefer
header.protected String
findActualKey
(AnyDAO<?> dao, String pretendingKey) protected Preference
ReadsPrefer
header from request and parses into aPreference
instance.protected boolean
protected Response
modificationResponse
(Object entity) Builds response to successful modification request, taking into account anyPrefer
header.protected static org.springframework.data.domain.Pageable
pageable
(AbstractQuery query) protected static org.springframework.data.domain.Pageable
pageable
(AbstractQuery query, org.springframework.data.domain.Sort defaultIfOrderByIsBlank) protected static org.springframework.data.domain.Sort
-
Field Details
-
LOG
-
OPTIONS_ALLOW
- See Also:
-
uriInfo
-
messageContext
-
searchContext
-
-
Constructor Details
-
AbstractService
public AbstractService()
-
-
Method Details
-
sort
protected static org.springframework.data.domain.Sort sort(String orderBy, org.springframework.data.domain.Sort defaultIfBlank) -
pageable
protected static org.springframework.data.domain.Pageable pageable(AbstractQuery query, org.springframework.data.domain.Sort defaultIfOrderByIsBlank) -
pageable
-
findActualKey
-
isNullPriorityAsync
protected boolean isNullPriorityAsync() -
getPreference
ReadsPrefer
header from request and parses into aPreference
instance.- Returns:
- a
Preference
instance matching the passedPrefer
header, orPreference.NONE
if missing.
-
applyPreference
protected Response.ResponseBuilder applyPreference(ProvisioningResult<?> provisioningResult, Response.ResponseBuilder builder) -
createResponse
Builds response to successfulcreate
request, taking into account anyPrefer
header.- Parameters:
provisioningResult
- the entity just created- Returns:
- response to successful
create
request
-
modificationResponse
Builds response to successful modification request, taking into account anyPrefer
header.- Parameters:
entity
- the entity just modified- Returns:
- response to successful modification request
-
checkETag
-
buildPagedResult
protected <T extends BaseBean> PagedResult<T> buildPagedResult(org.springframework.data.domain.Page<T> page) Builds a paged result out of page.- Type Parameters:
T
- result type- Parameters:
page
- page- Returns:
- paged result
-