Class AbstractAnyService<TO extends AnyTO,CR extends AnyCR,UR extends AnyUR>

All Implemented Interfaces:
AnyService<TO>, JAXRSService
Direct Known Subclasses:
AnyObjectServiceImpl, GroupServiceImpl, UserServiceImpl

public abstract class AbstractAnyService<TO extends AnyTO,CR extends AnyCR,UR extends AnyUR> extends AbstractSearchService implements AnyService<TO>
  • Constructor Details

    • AbstractAnyService

      public AbstractAnyService(SearchCondVisitor searchCondVisitor)
  • Method Details

    • getAnyDAO

      protected abstract AnyDAO<?> getAnyDAO()
    • getAnyLogic

      protected abstract AbstractAnyLogic<TO,CR,UR> getAnyLogic()
    • newUpdateReq

      protected abstract UR newUpdateReq(String key)
    • read

      public Set<Attr> read(String key, SchemaType schemaType)
      Description copied from interface: AnyService
      Reads the list of attributes owned by the given any object for the given schema type. Note that for the UserService, GroupService and AnyObjectService subclasses, if the key parameter looks like a UUID then it is interpreted as as key, otherwise as a (user)name.
      Specified by:
      read in interface AnyService<TO extends AnyTO>
      Parameters:
      key - any object key or name
      schemaType - schema type
      Returns:
      list of attributes, owned by the given any object, for the given schema type
    • read

      public Attr read(String key, SchemaType schemaType, String schema)
      Description copied from interface: AnyService
      Reads the attribute, owned by the given any object, for the given schema type and schema. Note that for the UserService, GroupService and AnyObjectService subclasses, if the key parameter looks like a UUID then it is interpreted as as key, otherwise as a (user)name.
      Specified by:
      read in interface AnyService<TO extends AnyTO>
      Parameters:
      key - any object key or name
      schemaType - schema type
      schema - schema
      Returns:
      attribute, owned by the given any object, for the given schema type and schema
    • read

      public TO read(String key)
      Description copied from interface: AnyService
      Reads the any object matching the provided key.
      Specified by:
      read in interface AnyService<TO extends AnyTO>
      Parameters:
      key - if value looks like a UUID then it is interpreted as key, otherwise as a (user)name
      Returns:
      any object with matching key
    • search

      public PagedResult<TO> search(AnyQuery anyQuery)
      Description copied from interface: AnyService
      Returns a paged list of any objects matching the given query.
      Specified by:
      search in interface AnyService<TO extends AnyTO>
      Parameters:
      anyQuery - query conditions
      Returns:
      paged list of any objects matching the given query
    • findLastChange

      protected OffsetDateTime findLastChange(String key)
    • doUpdate

      protected Response doUpdate(UR updateReq)
    • addUpdateOrReplaceAttr

      protected void addUpdateOrReplaceAttr(String key, SchemaType schemaType, Attr attrTO, PatchOperation operation)
    • update

      public Response update(String key, SchemaType schemaType, Attr attrTO)
      Description copied from interface: AnyService
      Adds or replaces the attribute, owned by the given any object, for the given schema type and schema.
      Specified by:
      update in interface AnyService<TO extends AnyTO>
      Parameters:
      key - any object key or name
      schemaType - schema type
      attrTO - attribute
      Returns:
      Response object featuring the updated any object attribute - as Entity
    • delete

      public void delete(String key, SchemaType schemaType, String schema)
      Description copied from interface: AnyService
      Deletes the attribute, owned by the given any object, for the given schema type and schema.
      Specified by:
      delete in interface AnyService<TO extends AnyTO>
      Parameters:
      key - any object key or name
      schemaType - schema type
      schema - schema
    • delete

      public Response delete(String key)
      Description copied from interface: AnyService
      Deletes any object matching provided key.
      Specified by:
      delete in interface AnyService<TO extends AnyTO>
      Parameters:
      key - any object key or name
      Returns:
      Response object featuring the deleted any object enriched with propagation status information
    • deassociate

      public Response deassociate(ResourceDR req)
      Description copied from interface: AnyService
      Executes resource-related operations on given entity.
      Specified by:
      deassociate in interface AnyService<TO extends AnyTO>
      Parameters:
      req - external resources to be used for propagation-related operations
      Returns:
      batch results as Response entity
    • associate

      public Response associate(ResourceAR req)
      Description copied from interface: AnyService
      Executes resource-related operations on given entity.
      Specified by:
      associate in interface AnyService<TO extends AnyTO>
      Parameters:
      req - external resources to be used for propagation-related operations
      Returns:
      batch results as Response entity