Class CollectionsClient
java.lang.Object
org.odpi.openmetadata.accessservices.digitalservice.client.DigitalServiceBaseClient
org.odpi.openmetadata.accessservices.digitalservice.client.CollectionsClient
- All Implemented Interfaces:
org.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface
public class CollectionsClient
extends DigitalServiceBaseClient
implements org.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface
The CollectionsClient supports requests related to collections.
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionsClient(String serverName, String serverPlatformURLRoot, int maxPageSize) Create a new client with no authentication embedded in the HTTP request.CollectionsClient(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) Create a new client that passes userId and password in each HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCollection(String userId, String collectionGUID, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties membershipProperties, String elementGUID) Add an element to a collection.voidattachCollection(String userId, String collectionGUID, String parentGUID, org.odpi.openmetadata.accessservices.digitalservice.properties.ResourceListProperties collectionUse, boolean makeAnchor) Connect an existing collection to an element using the ResourceList relationship (0019).createCollection(String userId, String anchorGUID, boolean isOwnAnchor, String optionalClassification, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties properties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) Create a new generic collection.createCollectionFromTemplate(String userId, String anchorGUID, boolean isOwnAnchor, Date effectiveFrom, Date effectiveTo, String templateGUID, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties replacementProperties, Map<String, String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) Create a new metadata element to represent a collection using an existing metadata element as a template.createDigitalProduct(String userId, String anchorGUID, boolean isOwnAnchor, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties collectionProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties digitalProductProperties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) Create a new collection that represents a digital product.voiddeleteCollection(String userId, String collectionGUID) Delete a collection.voiddetachCollection(String userId, String collectionGUID, String parentGUID) Detach an existing collection from an element.List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement>findCollections(String userId, String searchString, int startFrom, int pageSize, Date effectiveTime) Returns the list of collections matching the search string - this is coded as a regular expression.List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement>getAttachedCollections(String userId, String parentGUID, String collectionType, int startFrom, int pageSize) Returns the list of collections that are linked off of the supplied element.List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement>getClassifiedCollections(String userId, String classificationName, int startFrom, int pageSize) Returns the list of collections with a particular classification.org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElementgetCollection(String userId, String collectionGUID) Return the properties of a specific collection.List<org.odpi.openmetadata.accessservices.digitalservice.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.accessservices.digitalservice.metadataelements.CollectionElement>getCollectionsByName(String userId, String name, int startFrom, int pageSize, Date effectiveTime) Returns the list of collections with a particular name.List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement>getCollectionsByType(String userId, String collectionType, int startFrom, int pageSize) Returns the list of collections with a particular collectionType.voidremoveFromCollection(String userId, String collectionGUID, String elementGUID) Remove an element from a collection.voidupdateCollection(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties properties) Update the properties of a collection.voidupdateCollectionMembership(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties membershipProperties, String elementGUID) Update an element's membership to a collection.voidupdateDigitalProduct(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties properties) Update the properties of the DigitalProduct classification attached to a collection.
-
Constructor Details
-
CollectionsClient
public CollectionsClient(String serverName, String serverPlatformURLRoot, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesmaxPageSize- number of elements that can be returned on a call- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
CollectionsClient
public CollectionsClient(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsmaxPageSize- number of elements that can be returned on a call- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
getAttachedCollections
public List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement> getAttachedCollections(String userId, String parentGUID, String collectionType, 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.- Specified by:
getAttachedCollectionsin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestparentGUID- unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off ofcollectionType- filter response by collection type - if null, any value will dostartFrom- 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.
-
getClassifiedCollections
public List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement> getClassifiedCollections(String userId, String classificationName, 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 with a particular classification.- Specified by:
getClassifiedCollectionsin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestclassificationName- name of the classification - if null, all collections are returnedstartFrom- 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.
-
findCollections
public List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement> findCollections(String userId, String searchString, int startFrom, int pageSize, Date effectiveTime) 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 matching the search string - this is coded as a regular expression.- Specified by:
findCollectionsin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestsearchString- string to search forstartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to returneffectiveTime- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- 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.
-
getCollectionsByName
public List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement> getCollectionsByName(String userId, String name, int startFrom, int pageSize, Date effectiveTime) 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 with a particular name.- Specified by:
getCollectionsByNamein interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestname- name of the collections to return - match is full text match in qualifiedName or namestartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to returneffectiveTime- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- 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.
-
getCollectionsByType
public List<org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement> getCollectionsByType(String userId, String collectionType, 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 with a particular collectionType. This is an optional text field in the collection element.- Specified by:
getCollectionsByTypein interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestcollectionType- the collection type value to match on. If it is null, all collections with a null collectionType are returnedstartFrom- 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
public org.odpi.openmetadata.accessservices.digitalservice.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.- Specified by:
getCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestcollectionGUID- unique identifier of the required collection- 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
public String createCollection(String userId, String anchorGUID, boolean isOwnAnchor, String optionalClassification, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties properties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Create a new generic collection.- Specified by:
createCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.anchorGUID- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.isOwnAnchor- boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.optionalClassification- classification of the collections - typically RootCollection, Set or Folderproperties- properties for the collection.parentGUID- unique identifier of optional parent entityparentRelationshipTypeName- type of relationship to connect the new element to the parentparentRelationshipProperties- properties to include in parent relationshipparentAtEnd1- which end should the parent GUID go in the relationship- 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.
-
createCollectionFromTemplate
public String createCollectionFromTemplate(String userId, String anchorGUID, boolean isOwnAnchor, Date effectiveFrom, Date effectiveTo, String templateGUID, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties replacementProperties, Map<String, String> placeholderProperties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionCreate a new metadata element to represent a collection using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new collection.- Specified by:
createCollectionFromTemplatein interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- calling useranchorGUID- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.isOwnAnchor- boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.effectiveFrom- the date when this element is active - null for active on creationeffectiveTo- the date when this element becomes inactive - null for active until deletedtemplateGUID- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)replacementProperties- properties of the new metadata element. These override the template valuesplaceholderProperties- property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.parentGUID- unique identifier of optional parent entityparentRelationshipTypeName- type of relationship to connect the new element to the parentparentRelationshipProperties- properties to include in parent relationshipparentAtEnd1- which end should the parent GUID go in the relationship- Returns:
- unique identifier of the new metadata element
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
createDigitalProduct
public String createDigitalProduct(String userId, String anchorGUID, boolean isOwnAnchor, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties collectionProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties digitalProductProperties, String parentGUID, String parentRelationshipTypeName, org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties parentRelationshipProperties, boolean parentAtEnd1) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Create a new collection that represents a digital product.- Specified by:
createDigitalProductin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.anchorGUID- unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.isOwnAnchor- boolean flag to day that the element should be classified as its own anchor once its element is created in the repository.collectionProperties- properties for the collection.digitalProductProperties- properties for the attached DigitalProduct classificationparentGUID- unique identifier of optional parent entityparentRelationshipTypeName- type of relationship to connect the new element to the parentparentRelationshipProperties- properties to include in parent relationshipparentAtEnd1- which end should the parent GUID go in the relationship- 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.
-
updateCollection
public void updateCollection(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Update the properties of a collection.- Specified by:
updateCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection (returned from create)replaceAllProperties- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties- properties for the 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.
-
updateDigitalProduct
public void updateDigitalProduct(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Update the properties of the DigitalProduct classification attached to a collection.- Specified by:
updateDigitalProductin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection (returned from create)replaceAllProperties- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties- properties for the DigitalProduct classification.- 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
public void attachCollection(String userId, String collectionGUID, String parentGUID, org.odpi.openmetadata.accessservices.digitalservice.properties.ResourceListProperties collectionUse, 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 element using the ResourceList relationship (0019).- Specified by:
attachCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making requestcollectionGUID- unique identifier of the collectionparentGUID- unique identifier of referenceable object that the collection should be attached tocollectionUse- description of how the collection will be used.makeAnchor- 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
public 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.- Specified by:
detachCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- 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
public 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.- Specified by:
deleteCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- 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
public List<org.odpi.openmetadata.accessservices.digitalservice.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.- Specified by:
getCollectionMembersin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- 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
public void addToCollection(String userId, String collectionGUID, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties membershipProperties, 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.- Specified by:
addToCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.membershipProperties- properties describing the membership characteristics.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.
-
updateCollectionMembership
public void updateCollectionMembership(String userId, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties membershipProperties, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Update an element's membership to a collection.- Specified by:
updateCollectionMembershipin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- Parameters:
userId- userId of user making request.collectionGUID- unique identifier of the collection.replaceAllProperties- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.membershipProperties- properties describing the membership characteristics.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
public 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.- Specified by:
removeFromCollectionin interfaceorg.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface- 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.
-