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
,U2FRegistrationServiceImpl
,UserRequestServiceImpl
,UserSelfServiceImpl
,UserWorkflowTaskServiceImpl
,WAClientAppServiceImpl
,WAConfigServiceImpl
,WebAuthnRegistrationServiceImpl
public abstract class AbstractService extends Object implements JAXRSService
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
LOG
protected org.apache.cxf.jaxrs.ext.MessageContext
messageContext
protected static String
OPTIONS_ALLOW
protected org.apache.cxf.jaxrs.ext.search.SearchContext
searchContext
protected javax.ws.rs.core.UriInfo
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 AbstractService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.ResponseBuilder
applyPreference(ProvisioningResult<?> provisioningResult, javax.ws.rs.core.Response.ResponseBuilder builder)
protected <T extends BaseBean>
PagedResult<T>buildPagedResult(List<T> list, int page, int size, int totalCount)
Builds a paged result out of a list of items and additional information.protected void
checkETag(String etag)
protected javax.ws.rs.core.Response
createResponse(ProvisioningResult<?> provisioningResult)
Builds response to successfulcreate
request, taking into account anyPrefer
header.protected String
findActualKey(AnyDAO<?> dao, String pretendingKey)
protected List<OrderByClause>
getOrderByClauses(String orderBy)
protected Preference
getPreference()
ReadsPrefer
header from request and parses into aPreference
instance.protected boolean
isNullPriorityAsync()
protected javax.ws.rs.core.Response
modificationResponse(Object entity)
Builds response to successful modification request, taking into account anyPrefer
header.
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
OPTIONS_ALLOW
protected static final String OPTIONS_ALLOW
- See Also:
- Constant Field Values
-
uriInfo
@Context protected javax.ws.rs.core.UriInfo uriInfo
-
messageContext
@Context protected org.apache.cxf.jaxrs.ext.MessageContext messageContext
-
searchContext
@Context protected org.apache.cxf.jaxrs.ext.search.SearchContext searchContext
-
-
Method Detail
-
isNullPriorityAsync
protected boolean isNullPriorityAsync()
-
getPreference
protected Preference getPreference()
ReadsPrefer
header from request and parses into aPreference
instance.- Returns:
- a
Preference
instance matching the passedPrefer
header, orPreference.NONE
if missing.
-
applyPreference
protected javax.ws.rs.core.Response.ResponseBuilder applyPreference(ProvisioningResult<?> provisioningResult, javax.ws.rs.core.Response.ResponseBuilder builder)
-
createResponse
protected javax.ws.rs.core.Response createResponse(ProvisioningResult<?> provisioningResult)
Builds response to successfulcreate
request, taking into account anyPrefer
header.- Parameters:
provisioningResult
- the entity just created- Returns:
- response to successful
create
request
-
modificationResponse
protected javax.ws.rs.core.Response modificationResponse(Object entity)
Builds response to successful modification request, taking into account anyPrefer
header.- Parameters:
entity
- the entity just modified- Returns:
- response to successful modification request
-
checkETag
protected void checkETag(String etag)
-
getOrderByClauses
protected List<OrderByClause> getOrderByClauses(String orderBy)
-
buildPagedResult
protected <T extends BaseBean> PagedResult<T> buildPagedResult(List<T> list, int page, int size, int totalCount)
Builds a paged result out of a list of items and additional information.- Type Parameters:
T
- result type- Parameters:
list
- bare list of items to be returnedpage
- current pagesize
- requested sizetotalCount
- total result size (not considering pagination)- Returns:
- paged result
-
-