Interface AssetCollectionInterface
- All Known Implementing Classes:
AssetOwner
,AvroFileAssetOwner
,CSVFileAssetOwner
,FileSystemAssetOwner
,ValidValuesAssetOwner
public interface AssetCollectionInterface
The CollectionManagementInterface adds methods for managing collections that can be attached to assets
and their related elements.
-
Method Summary
Modifier and TypeMethodDescriptioncreateCollection
(String userId, CollectionProperties properties) Create a new generic collection.createFolderCollection
(String userId, CollectionFolderProperties properties) Create a collection that acts like a folder with an order.findCollections
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of collection metadata elements that contain the search string.getCollection
(String userId, String collectionGUID) Return the properties of a specific collection.getCollectionMember
(String userId, String collectionGUID, String memberGUID) Return details of the membership between a collection and a specific member of the collection.getCollectionMembers
(String userId, String collectionGUID, int startFrom, int pageSize) Return a list of elements that are a member of a collection.getCollections
(String userId, String parentGUID, int startFrom, int pageSize) Returns the list of collections that are linked off of the supplied element.getCollectionsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of collection metadata elements with a matching qualified or display name.getElementsCollections
(String userId, String elementGUID, int startFrom, int pageSize) Return a list of collections that the supplied element is a member of.void
removeCollection
(String userId, String collectionGUID) Delete a collection.void
removeFromCollection
(String userId, String collectionGUID, String elementGUID) Remove an element from a collection.void
updateCollection
(String userId, String collectionGUID, boolean isMergeUpdate, CollectionProperties properties) Update the metadata element representing a collection.void
updateCollectionMembership
(String userId, String collectionGUID, CollectionMembershipProperties properties, boolean isMergeUpdate, String elementGUID) Add an element to a collection (or update its membership properties).
-
Method Details
-
getCollections
List<CollectionElement> getCollections(String userId, 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 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:
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.
-
getCollection
CollectionElement getCollection(String userId, String collectionGUID) throws InvalidParameterException, PropertyServerException, 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:
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.
-
findCollections
List<CollectionElement> findCollections(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of collection metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getCollectionsByName
List<CollectionElement> getCollectionsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of collection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createCollection
String createCollection(String userId, CollectionProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a new generic collection.- Parameters:
userId
- userId of user making request.properties
- description of the collection.- 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.
-
createFolderCollection
String createFolderCollection(String userId, CollectionFolderProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a collection that acts like a folder with an order.- Parameters:
userId
- userId of user making request.properties
- description of the collection.- 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.
-
updateCollection
void updateCollection(String userId, String collectionGUID, boolean isMergeUpdate, CollectionProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a collection.- Parameters:
userId
- calling usercollectionGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?properties
- new properties for this element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeCollection
void removeCollection(String userId, String collectionGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a collection. It is deleted 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:
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.
-
getCollectionMembers
List<CollectionMember> getCollectionMembers(String userId, String collectionGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, 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:
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.
-
getCollectionMember
CollectionMember getCollectionMember(String userId, String collectionGUID, String memberGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return details of the membership between a collection and a specific member of the collection.- Parameters:
userId
- userId of user making request.collectionGUID
- unique identifier of the collection.memberGUID
- unique identifier of the element who is a member of the collection.- Returns:
- list of asset details
- 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.
-
getElementsCollections
List<CollectionElement> getElementsCollections(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return a list of collections that the supplied element is a member of.- Parameters:
userId
- userId of user making request.elementGUID
- 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:
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.
-
updateCollectionMembership
void updateCollectionMembership(String userId, String collectionGUID, CollectionMembershipProperties properties, boolean isMergeUpdate, String elementGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Add an element to a collection (or update its membership properties).- Parameters:
userId
- userId of user making request.collectionGUID
- unique identifier of the collection.properties
- new propertiesisMergeUpdate
- should the properties be merged with the existing properties or replace them?elementGUID
- unique identifier of the element.- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem updating information in the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeFromCollection
void removeFromCollection(String userId, String collectionGUID, String elementGUID) throws InvalidParameterException, PropertyServerException, 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:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem updating information in the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-