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

    • Constructor Detail

      • AbstractAnyService

        public AbstractAnyService​(SearchCondVisitor searchCondVisitor)
    • Method Detail

      • getAnyDAO

        protected abstract AnyDAO<?> getAnyDAO()
      • 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
      • doUpdate

        protected javax.ws.rs.core.Response doUpdate​(UR updateReq)
      • update

        public javax.ws.rs.core.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 javax.ws.rs.core.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 javax.ws.rs.core.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 javax.ws.rs.core.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