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 Details

  • Constructor Details

    • PolicyServiceImpl

      public PolicyServiceImpl(PolicyLogic logic)
  • Method Details

    • create

      public Response create(PolicyType type, PolicyTO policyTO)
      Description copied from interface: PolicyService
      Create a new policy.
      Specified by:
      create in interface PolicyService
      Parameters:
      type - policy type
      policyTO - 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 interface PolicyService
      Parameters:
      type - policy type
      key - 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 interface PolicyService
      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 interface PolicyService
      Type Parameters:
      T - response type (extending PolicyTO)
      Parameters:
      type - policy type
      key - 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 interface PolicyService
      Parameters:
      type - policy type
      policyTO - Policy to replace existing policy