Interface ManageCollections
public interface ManageCollections
The ManageCollections adds methods for managing collections.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCollection(String userId, String collectionGUID, String elementGUID) Add an element to a collection.voidattachCollection(String userId, String collectionGUID, String parentGUID, boolean makeAnchor) Connect an existing collection to an anchor point.createCollection(String userId, String qualifiedName, String displayName, String description, String collectionUse, Map<String, Object> additionalProperties) Create a new generic collection.createFolder(String userId, String qualifiedName, String displayName, String description, String collectionUse, org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy collectionOrder, Map<String, Object> additionalProperties) Create a collection that acts like a folder with an order.createSet(String userId, String qualifiedName, String displayName, String description, String collectionUse, Map<String, Object> additionalProperties) Create a collection that acts like a set (this does not allow duplicate entries).voiddeleteCollection(String userId, String collectionGUID) Delete a collection.voiddetachCollection(String userId, String collectionGUID, String parentGUID) Detach an existing collection from an element.org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElementgetCollection(String userId, String collectionGUID) Return the properties of a specific collection.List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember>getCollectionMembers(String userId, String collectionGUID, int startFrom, int pageSize) Return a list of elements that are a member of a collection.List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement>getCollections(String userId, String parentGUID, int startFrom, int pageSize) Returns the list of collections that are linked off of the supplied element.voidremoveFromCollection(String userId, String collectionGUID, String elementGUID) Remove an element from a collection.
-
Method Details
-
getCollections
List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement> getCollections(String userId, String parentGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the list of collections that are linked off of the supplied element.- Parameters:
userId- userId of user making requestparentGUID- 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCollection
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement getCollection(String userId, String collectionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Return the properties of a specific collection.- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the required connection.- Returns:
- collection properties
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
createCollection
String createCollection(String userId, String qualifiedName, String displayName, String description, String collectionUse, Map<String, Object> additionalProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedExceptionCreate 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
createFolder
String createFolder(String userId, String qualifiedName, String displayName, String description, String collectionUse, org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy collectionOrder, Map<String, Object> additionalProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedExceptionCreate 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
createSet
String createSet(String userId, String qualifiedName, String displayName, String description, String collectionUse, Map<String, Object> additionalProperties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedExceptionCreate 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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
attachCollection
void attachCollection(String userId, String collectionGUID, String parentGUID, boolean makeAnchor) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Connect an existing collection to an anchor point.- Parameters:
userId- userId of user making requestcollectionGUID- unique identifier of the collectionparentGUID- unique identifier of referenceable object that the collection should be attached tomakeAnchor- like the lifecycle of the collection to that of the parent so that if the parent is deleted, so is the collection- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
detachCollection
void detachCollection(String userId, String collectionGUID, String parentGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
deleteCollection
void deleteCollection(String userId, String collectionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Delete a collection. It is detected from all parent elements. If members are anchored to the collection then they are also deleted.- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCollectionMembers
List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember> getCollectionMembers(String userId, String collectionGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Return a list of elements that are a member of a collection.- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.startFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.- Returns:
- list of asset details
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
addToCollection
void addToCollection(String userId, String collectionGUID, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Add an element to a collection.- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.elementGUID- unique identifier of the element.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem updating information in the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
removeFromCollection
void removeFromCollection(String userId, String collectionGUID, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Remove an element from a collection.- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.elementGUID- unique identifier of the element.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem updating information in the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-