Class CollectionManagerRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.collectionmanager.server.CollectionManagerRESTServices
public class CollectionManagerRESTServices
extends org.odpi.openmetadata.tokencontroller.TokenController
The CollectionManagerRESTServices provides the implementation of the Collection Manager Open Metadata View Service (OMVS).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseaddToCollection(String serverName, String collectionGUID, String elementGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties requestBody) Add an element to a collection.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseattachCollection(String serverName, String collectionGUID, String parentGUID, boolean makeAnchor, org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties requestBody) Connect an existing collection to an element using the ResourceList relationship (0019).org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateCollection(String serverName, String optionalClassificationName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new generic collection.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateCollectionFromTemplate(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent a collection using an existing metadata element as a template.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateDataSpecCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the DataSpecCollection classification.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateDigitalProduct(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewDigitalProductRequestBody requestBody) Create a new collection that represents a digital product.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateFolderCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the Folder classification.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateRootCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the RootCollection classification.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsedeleteCollection(String serverName, String collectionGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Delete a collection.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsedetachCollection(String serverName, String collectionGUID, String parentGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Detach an existing collection from an element.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponsefindCollections(String serverName, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections matching the search string - this is coded as a regular expression.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponsegetAttachedCollections(String serverName, String parentGUID, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections that are linked off of the supplied element.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponsegetClassifiedCollections(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular classification.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionResponsegetCollection(String serverName, String collectionGUID) Return the properties of a specific collection.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionMembersResponsegetCollectionMembers(String serverName, String collectionGUID, int startFrom, int pageSize) Return a list of elements that are a member of a collection.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponsegetCollectionsByName(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular name.org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponsegetCollectionsByType(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular collectionType.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseremoveFromCollection(String serverName, String collectionGUID, String elementGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove an element from a collection.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseupdateCollection(String serverName, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties requestBody) Update the properties of a collection.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseupdateCollectionMembership(String serverName, String collectionGUID, String elementGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties requestBody) Update an element's membership to a collection.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseupdateDigitalProduct(String serverName, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties requestBody) Update the properties of the DigitalProduct classification attached to a collection.
-
Constructor Details
-
CollectionManagerRESTServices
public CollectionManagerRESTServices()Default constructor
-
-
Method Details
-
getAttachedCollections
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse getAttachedCollections(String serverName, String parentGUID, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections that are linked off of the supplied element.- Parameters:
serverName- name of called serverparentGUID- unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off ofstartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to returnrequestBody- filter response by collection type - if null, any value will do- Returns:
- a list of collections 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.
-
getClassifiedCollections
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse getClassifiedCollections(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular classification.- Parameters:
serverName- name of called serverrequestBody- 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 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
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse findCollections(String serverName, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections matching the search string - this is coded as a regular expression.- Parameters:
serverName- name of the service to route the request tostartsWith- does the value start with the supplied string?endsWith- does the value end with the supplied string?ignoreCase- should the search ignore case?startFrom- paging start pointpageSize- maximum results that can be returnedrequestBody- string to find in the properties- Returns:
- a list of collections 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.
-
getCollectionsByName
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse getCollectionsByName(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular name.- Parameters:
serverName- name of called serverrequestBody- 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 return- Returns:
- a list of collections 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.
-
getCollectionsByType
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse getCollectionsByType(String serverName, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections with a particular collectionType. This is an optional text field in the collection element.- Parameters:
serverName- name of called serverrequestBody- 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 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
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionResponse getCollection(String serverName, String collectionGUID) Return the properties of a specific collection.- Parameters:
serverName- name of called servercollectionGUID- unique identifier of the required collection- Returns:
- collection properties 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
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createCollection(String serverName, String optionalClassificationName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new generic collection.- Parameters:
serverName- name of called server.optionalClassificationName- name of collection classificationrequestBody- properties for the collection.- Returns:
- unique identifier of the newly created Collection 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.
-
createRootCollection
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createRootCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the RootCollection classification. Used to identify the top of a collection hierarchy.- Parameters:
serverName- name of called server.requestBody- properties for the collection.- Returns:
- unique identifier of the newly created Collection 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.
-
createDataSpecCollection
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createDataSpecCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the DataSpecCollection classification. Used to identify the top of a collection hierarchy.- Parameters:
serverName- name of called server.requestBody- properties for the collection.- Returns:
- unique identifier of the newly created Collection 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
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createFolderCollection(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewCollectionRequestBody requestBody) Create a new collection with the Folder classification. This is used to identify the organizing collections in a collection hierarchy.- Parameters:
serverName- name of called server.requestBody- properties for the collection.- Returns:
- unique identifier of the newly created Collection 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.
-
createCollectionFromTemplate
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createCollectionFromTemplate(String serverName, TemplateRequestBody requestBody) Create 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.- Parameters:
serverName- calling userrequestBody- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
createDigitalProduct
public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createDigitalProduct(String serverName, org.odpi.openmetadata.commonservices.ffdc.rest.NewDigitalProductRequestBody requestBody) Create a new collection that represents a digital product.- Parameters:
serverName- name of called server.requestBody- properties for the collection and attached DigitalProduct classification- Returns:
- unique identifier of the newly created Collection 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
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateCollection(String serverName, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties requestBody) Update the properties of a collection.- Parameters:
serverName- name of called server.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.requestBody- properties for the collection.- Returns:
- void or 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.
-
updateDigitalProduct
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateDigitalProduct(String serverName, String collectionGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties requestBody) Update the properties of the DigitalProduct classification attached to a collection.- Parameters:
serverName- name of called server.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.requestBody- properties for the DigitalProduct classification.- Returns:
- void or 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
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse attachCollection(String serverName, String collectionGUID, String parentGUID, boolean makeAnchor, org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties requestBody) Connect an existing collection to an element using the ResourceList relationship (0019).- Parameters:
serverName- name of called servercollectionGUID- unique identifier of the collectionparentGUID- unique identifier of referenceable object that the collection should be attached torequestBody- 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- Returns:
- void or 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
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse detachCollection(String serverName, String collectionGUID, String parentGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Detach an existing collection from an element. If the collection is anchored to the element, it is deleted.- Parameters:
serverName- name of called server.collectionGUID- unique identifier of the collection.parentGUID- unique identifier of referenceable object that the collection should be attached torequestBody- null request body- Returns:
- void or 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.
-
deleteCollection
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse deleteCollection(String serverName, String collectionGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Delete a collection. It is detected from all parent elements. If members are anchored to the collection then they are also deleted.- Parameters:
serverName- name of called server.collectionGUID- unique identifier of the collection.requestBody- null request body- Returns:
- void or 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
public org.odpi.openmetadata.commonservices.ffdc.rest.CollectionMembersResponse getCollectionMembers(String serverName, String collectionGUID, int startFrom, int pageSize) Return a list of elements that are a member of a collection.- Parameters:
serverName- name of called server.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 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.
-
addToCollection
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse addToCollection(String serverName, String collectionGUID, String elementGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties requestBody) Add an element to a collection.- Parameters:
serverName- name of called server.collectionGUID- unique identifier of the collection.requestBody- properties describing the membership characteristics.elementGUID- unique identifier of the element.- Returns:
- void or 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.
-
updateCollectionMembership
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateCollectionMembership(String serverName, String collectionGUID, String elementGUID, boolean replaceAllProperties, org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties requestBody) Update an element's membership to a collection.- Parameters:
serverName- name of called server.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.requestBody- properties describing the membership characteristics.elementGUID- unique identifier of the element.- Returns:
- void or 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
public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse removeFromCollection(String serverName, String collectionGUID, String elementGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove an element from a collection.- Parameters:
serverName- name of called server.collectionGUID- unique identifier of the collection.elementGUID- unique identifier of the element.requestBody- null request body- Returns:
- void or 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.
-