Interface CollectionManagementInterface


  • public interface CollectionManagementInterface
    The Community Profile Open Metadata Access Service (OMAS) is used by tools and administrators to maintain information associated with individuals and communities. The MyFavouriteCollectionsInterface manages three standard collections of favourite assets, projects and communities. The CollectionManagementInterface adds methods for managing additional collections that can be attached to communities and personal profiles.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void attachCollection​(java.lang.String userId, java.lang.String collectionGUID, java.lang.String parentGUID, boolean makeAnchor)
      Connect an existing collection to an anchor point.
      java.lang.String createCollection​(java.lang.String userId, java.lang.String qualifiedName, java.lang.String displayName, java.lang.String description, java.lang.String collectionUse, java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
      Create a new generic collection.
      java.lang.String createFolder​(java.lang.String userId, java.lang.String qualifiedName, java.lang.String displayName, java.lang.String description, java.lang.String collectionUse, CollectionOrder collectionOrder, java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
      Create a collection that acts like a folder with an order.
      java.lang.String createSet​(java.lang.String userId, java.lang.String qualifiedName, java.lang.String displayName, java.lang.String description, java.lang.String collectionUse, java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
      Create a collection that acts like a set (this does not allow duplicate entries).
      void deleteCollection​(java.lang.String userId, java.lang.String collectionGUID)
      Delete a collection.
      void detachCollection​(java.lang.String userId, java.lang.String collectionGUID, java.lang.String parentGUID)
      Detach an existing collection from an element.
      CollectionElement getCollection​(java.lang.String userId, java.lang.String collectionGUID)
      Return the properties of a specific collection.
      java.util.List<CollectionElement> getCollections​(java.lang.String userId, java.lang.String parentGUID, int startFrom, int pageSize)
      Returns the list of collections that are linked off of the supplied element.
    • Method Detail

      • getCollections

        java.util.List<CollectionElement> getCollections​(java.lang.String userId,
                                                         java.lang.String parentGUID,
                                                         int startFrom,
                                                         int pageSize)
                                                  throws InvalidParameterException,
                                                         PropertyServerException,
                                                         UserNotAuthorizedException
        Returns the list of collections that are linked off of the supplied element.
        Parameters:
        userId - userId of user making request
        parentGUID - unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off of.
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return
        Returns:
        a list of collections
        Throws:
        InvalidParameterException - one of the parameters is null or invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • createCollection

        java.lang.String createCollection​(java.lang.String userId,
                                          java.lang.String qualifiedName,
                                          java.lang.String displayName,
                                          java.lang.String description,
                                          java.lang.String collectionUse,
                                          java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
                                   throws InvalidParameterException,
                                          PropertyServerException,
                                          UserNotAuthorizedException
        Create a new generic collection.
        Parameters:
        userId - userId of user making request.
        qualifiedName - unique name of the collection.
        displayName - short displayable name for the collection.
        description - description of the collection.
        collectionUse - description of how the collection is to be used.
        additionalProperties - additional arbitrary properties.
        Returns:
        unique identifier of the newly created Collection
        Throws:
        InvalidParameterException - one of the parameters is invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • createFolder

        java.lang.String createFolder​(java.lang.String userId,
                                      java.lang.String qualifiedName,
                                      java.lang.String displayName,
                                      java.lang.String description,
                                      java.lang.String collectionUse,
                                      CollectionOrder collectionOrder,
                                      java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
                               throws InvalidParameterException,
                                      PropertyServerException,
                                      UserNotAuthorizedException
        Create a collection that acts like a folder with an order.
        Parameters:
        userId - userId of user making request.
        qualifiedName - unique name of the collection.
        displayName - short displayable name for the collection.
        description - description of the collection.
        collectionUse - description of how the collection will be used.
        collectionOrder - description of how the members in the collection should be organized.
        additionalProperties - additional arbitrary properties.
        Returns:
        unique identifier of the newly created Collection
        Throws:
        InvalidParameterException - one of the parameters is invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • createSet

        java.lang.String createSet​(java.lang.String userId,
                                   java.lang.String qualifiedName,
                                   java.lang.String displayName,
                                   java.lang.String description,
                                   java.lang.String collectionUse,
                                   java.util.Map<java.lang.String,​java.lang.Object> additionalProperties)
                            throws InvalidParameterException,
                                   PropertyServerException,
                                   UserNotAuthorizedException
        Create a collection that acts like a set (this does not allow duplicate entries).
        Parameters:
        userId - userId of user making request.
        qualifiedName - unique name of the collection.
        displayName - short displayable name for the collection.
        description - description of the collection.
        collectionUse - description of how the collection will be used.
        additionalProperties - additional arbitrary properties.
        Returns:
        unique identifier of the newly created Collection
        Throws:
        InvalidParameterException - one of the parameters is invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • attachCollection

        void attachCollection​(java.lang.String userId,
                              java.lang.String collectionGUID,
                              java.lang.String parentGUID,
                              boolean makeAnchor)
                       throws InvalidParameterException,
                              PropertyServerException,
                              UserNotAuthorizedException
        Connect an existing collection to an anchor point.
        Parameters:
        userId - userId of user making request
        collectionGUID - unique identifier of the collection
        parentGUID - unique identifier of referenceable object that the collection should be attached to
        makeAnchor - like the lifecycle of the collection to that of the parent so that if the parent is deleted, so is the collection
        Throws:
        InvalidParameterException - one of the parameters is null or invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • detachCollection

        void detachCollection​(java.lang.String userId,
                              java.lang.String collectionGUID,
                              java.lang.String parentGUID)
                       throws InvalidParameterException,
                              PropertyServerException,
                              UserNotAuthorizedException
        Detach an existing collection from an element. If the collection is anchored to the element, it is deleted.
        Parameters:
        userId - userId of user making request.
        collectionGUID - unique identifier of the collection.
        parentGUID - unique identifier of referenceable object that the collection should be attached to.
        Throws:
        InvalidParameterException - one of the parameters is null or invalid.
        PropertyServerException - there is a problem retrieving information from the property server(s).
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.