Class ResourceServiceImpl

java.lang.Object
org.apache.syncope.core.rest.cxf.service.AbstractService
org.apache.syncope.core.rest.cxf.service.ResourceServiceImpl
All Implemented Interfaces:
JAXRSService, ResourceService

@Service public class ResourceServiceImpl extends AbstractService implements ResourceService
  • Field Details

  • Constructor Details

    • ResourceServiceImpl

      public ResourceServiceImpl(ResourceLogic logic)
  • Method Details

    • create

      public Response create(ResourceTO resourceTO)
      Description copied from interface: ResourceService
      Creates a new resource.
      Specified by:
      create in interface ResourceService
      Parameters:
      resourceTO - Resource to be created
      Returns:
      Response object featuring Location header of created resource
    • update

      public void update(ResourceTO resourceTO)
      Description copied from interface: ResourceService
      Updates the resource matching the given name.
      Specified by:
      update in interface ResourceService
      Parameters:
      resourceTO - resource to be stored
    • setLatestSyncToken

      public void setLatestSyncToken(String key, String anyTypeKey)
      Description copied from interface: ResourceService
      Queries the connector underlying the given resource for the latest sync token value associated to the given any type and stores the value internally, for later usage.
      Specified by:
      setLatestSyncToken in interface ResourceService
      Parameters:
      key - resource
      anyTypeKey - any type
    • removeSyncToken

      public void removeSyncToken(String key, String anyTypeKey)
      Description copied from interface: ResourceService
      Removes the sync token value associated to the given any type from the given resource.
      Specified by:
      removeSyncToken in interface ResourceService
      Parameters:
      key - resource
      anyTypeKey - any type
    • delete

      public void delete(String key)
      Description copied from interface: ResourceService
      Deletes the resource matching the given name.
      Specified by:
      delete in interface ResourceService
      Parameters:
      key - name of resource to be deleted
    • read

      public ResourceTO read(String key)
      Description copied from interface: ResourceService
      Returns the resource with matching name.
      Specified by:
      read in interface ResourceService
      Parameters:
      key - Name of resource to be read
      Returns:
      resource with matching name
    • list

      public List<ResourceTO> list()
      Description copied from interface: ResourceService
      Returns a list of all resources.
      Specified by:
      list in interface ResourceService
      Returns:
      list of all resources
    • getConnObjectKeyValue

      public Response getConnObjectKeyValue(String key, String anyTypeKey, String anyKey)
      Description copied from interface: ResourceService
      Returns the calculated connObjectKey value for the given type and key.
      Specified by:
      getConnObjectKeyValue in interface ResourceService
      Parameters:
      key - name of resource to read connector object from
      anyTypeKey - any object type
      anyKey - user, group or any object key
      Returns:
      connObjectKey value for the external resource, for the given type and key
    • readConnObject

      public ConnObject readConnObject(String key, String anyTypeKey, String value)
      Description copied from interface: ResourceService
      Returns connector object from the external resource, for the given type and key.
      Specified by:
      readConnObject in interface ResourceService
      Parameters:
      key - name of resource to read connector object from
      anyTypeKey - any object type
      value - if value looks like a UUID then it is interpreted as user, group or any object key, otherwise as key value on the resource
      Returns:
      connector object from the external resource, for the given type and key
    • searchConnObjects

      public PagedConnObjectResult searchConnObjects(String key, String anyTypeKey, ConnObjectTOQuery query)
      Description copied from interface: ResourceService
      Returns a paged list of connector objects from external resource, for the given type, matching page/size conditions.
      Specified by:
      searchConnObjects in interface ResourceService
      Parameters:
      key - name of resource to read connector object from
      anyTypeKey - any object type
      query - query conditions
      Returns:
      connector objects from the external resource, for the given type
    • check

      public void check(ResourceTO resourceTO)
      Description copied from interface: ResourceService
      Checks whether the connection to resource could be established.
      Specified by:
      check in interface ResourceService
      Parameters:
      resourceTO - resource to be checked