Class CollectionRESTServices

java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.CollectionRESTServices

public class CollectionRESTServices extends Object
CollectionRESTServices provides the API operations to create and maintain collection information.
  • Constructor Details

    • CollectionRESTServices

      public CollectionRESTServices()
      Default constructor
  • Method Details

    • createCollection

      public GUIDResponse createCollection(String serverName, String userId, ReferenceableRequestBody requestBody)
      Create a new metadata element to represent a collection.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - properties to store
      Returns:
      unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • createFolderCollection

      public GUIDResponse createFolderCollection(String serverName, String userId, ReferenceableRequestBody requestBody)
      Create a new metadata element to represent a collection.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - properties to store
      Returns:
      unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • updateCollection

      public VoidResponse updateCollection(String serverName, String userId, String collectionGUID, boolean isMergeUpdate, ReferenceableRequestBody requestBody)
      Update the metadata element representing a collection.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      collectionGUID - unique identifier of the metadata element to update
      isMergeUpdate - should the new properties be merged with the existing properties of overlay them?
      requestBody - new properties for this element
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • updateCollectionMembership

      public VoidResponse updateCollectionMembership(String serverName, String userId, String collectionGUID, String collectionRoleGUID, boolean isMergeUpdate, RelationshipRequestBody requestBody)
      Create a relationship between a collection and a person role.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      collectionGUID - unique identifier of the collection in the external data manager
      collectionRoleGUID - unique identifier of the person role in the external data manager
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      requestBody - relationship properties
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • removeFromCollection

      public VoidResponse removeFromCollection(String serverName, String userId, String collectionGUID, String collectionRoleGUID, ExternalSourceRequestBody requestBody)
      Remove a relationship between a collection and a role.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      collectionGUID - unique identifier of the collection in the external data manager
      collectionRoleGUID - unique identifier of the role in the external data manager
      requestBody - external source identifiers
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • removeCollection

      public VoidResponse removeCollection(String serverName, String userId, String collectionGUID, ExternalSourceRequestBody requestBody)
      Remove the metadata element representing a collection.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      collectionGUID - unique identifier of the metadata element to remove
      requestBody - external source identifiers
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • findCollections

      public CollectionsResponse findCollections(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of collection metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getCollectionsByName

      public CollectionsResponse getCollectionsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of collection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getCollectionMembers

      public CollectionMembersResponse getCollectionMembers(String serverName, String userId, String collectionGUID, int startFrom, int pageSize)
      Return information about a person role connected to the named collection.
      Parameters:
      serverName - called server
      userId - calling user
      collectionGUID - unique identifier for the collection
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      list of matching person roles InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getCollections

      public CollectionsResponse getCollections(String serverName, String userId, String parentGUID, int startFrom, int pageSize)
      Retrieve the list of collection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      parentGUID - unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off of.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getCollectionByGUID

      public CollectionResponse getCollectionByGUID(String serverName, String userId, String guid)
      Retrieve the collection metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      guid - unique identifier of the requested metadata element
      Returns:
      matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)