Class PolicyServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.PolicyServiceImpl
-
- All Implemented Interfaces:
JAXRSService
,PolicyService
@Service public class PolicyServiceImpl extends AbstractService implements PolicyService
-
-
Field Summary
Fields Modifier and Type Field Description protected PolicyLogic
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 PolicyServiceImpl(PolicyLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
create(PolicyType type, PolicyTO policyTO)
Create a new policy.void
delete(PolicyType type, String key)
Delete policy matching the given key.<T extends PolicyTO>
List<T>list(PolicyType type)
Returns a list of policies of the matching type.<T extends PolicyTO>
Tread(PolicyType type, String key)
Returns the policy matching the given key.void
update(PolicyType type, PolicyTO policyTO)
Updates policy matching the given 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 PolicyLogic logic
-
-
Constructor Detail
-
PolicyServiceImpl
public PolicyServiceImpl(PolicyLogic logic)
-
-
Method Detail
-
create
public javax.ws.rs.core.Response create(PolicyType type, PolicyTO policyTO)
Description copied from interface:PolicyService
Create a new policy.- Specified by:
create
in interfacePolicyService
- Parameters:
type
- policy typepolicyTO
- Policy to be created (needs to match type)- Returns:
- Response object featuring Location header of created policy
-
delete
public void delete(PolicyType type, String key)
Description copied from interface:PolicyService
Delete policy matching the given key.- Specified by:
delete
in interfacePolicyService
- Parameters:
type
- policy typekey
- key of policy to be deleted
-
list
public <T extends PolicyTO> List<T> list(PolicyType type)
Description copied from interface:PolicyService
Returns a list of policies of the matching type.- Specified by:
list
in interfacePolicyService
- Type Parameters:
T
- response type (extending PolicyTO)- Parameters:
type
- Type selector for requested policies- Returns:
- list of policies with matching type
-
read
public <T extends PolicyTO> T read(PolicyType type, String key)
Description copied from interface:PolicyService
Returns the policy matching the given key.- Specified by:
read
in interfacePolicyService
- Type Parameters:
T
- response type (extending PolicyTO)- Parameters:
type
- policy typekey
- key of requested policy- Returns:
- policy with matching id
-
update
public void update(PolicyType type, PolicyTO policyTO)
Description copied from interface:PolicyService
Updates policy matching the given key.- Specified by:
update
in interfacePolicyService
- Parameters:
type
- policy typepolicyTO
- Policy to replace existing policy
-
-