Class CollectionManagerResource
java.lang.Object
org.odpi.openmetadata.viewservices.collectionmanager.server.spring.CollectionManagerResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/collection-manager")
public class CollectionManagerResource
extends Object
The CollectionManagerResource provides the Spring API endpoints 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.accessservices.digitalservice.properties.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.accessservices.digitalservice.properties.ResourceListProperties requestBody) Connect an existing collection to an element using the ResourceList relationship (0019).org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateCollection(String serverName, String classificationName, org.odpi.openmetadata.viewservices.collectionmanager.rest.NewCollectionRequestBody requestBody) Create a new generic collection.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateCollectionFromTemplate(String serverName, org.odpi.openmetadata.viewservices.collectionmanager.rest.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.viewservices.collectionmanager.rest.NewCollectionRequestBody requestBody) Create a new collection with the DataSpec classification.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateDigitalProduct(String serverName, org.odpi.openmetadata.viewservices.collectionmanager.rest.NewDigitalProductRequestBody requestBody) Create a new collection that represents a digital product.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateFolderCollection(String serverName, org.odpi.openmetadata.viewservices.collectionmanager.rest.NewCollectionRequestBody requestBody) Create a new collection with the Folder classification.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateRootCollection(String serverName, org.odpi.openmetadata.viewservices.collectionmanager.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.viewservices.collectionmanager.rest.CollectionListResponsefindCollections(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.org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponsegetAttachedCollections(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.viewservices.collectionmanager.rest.CollectionListResponsegetClassifiedCollections(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.viewservices.collectionmanager.rest.CollectionResponsegetCollection(String serverName, String collectionGUID) Return the properties of a specific collection.org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionMemberListResponsegetCollectionMembers(String serverName, String collectionGUID, int startFrom, int pageSize) Return a list of elements that are a member of a collection.org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponsegetCollectionsByName(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.viewservices.collectionmanager.rest.CollectionListResponsegetCollectionsByType(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.accessservices.digitalservice.properties.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.accessservices.digitalservice.properties.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.accessservices.digitalservice.properties.DigitalProductProperties requestBody) Update the properties of the DigitalProduct classification attached to a collection.
-
Constructor Details
-
CollectionManagerResource
public CollectionManagerResource()Default constructor
-
-
Method Details
-
getAttachedCollections
@PostMapping(path="/metadata-elements/{parentGUID}/collections") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponse getAttachedCollections(@PathVariable String serverName, @PathVariable String parentGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) 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
@PostMapping(path="/collections/by-classifications") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponse getClassifiedCollections(@PathVariable String serverName, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) 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
@PostMapping(path="/collections/by-search-string") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponse findCollections(@PathVariable String serverName, @RequestParam(required=false,defaultValue="false") boolean startsWith, @RequestParam(required=false,defaultValue="false") boolean endsWith, @RequestParam(required=false,defaultValue="false") boolean ignoreCase, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody requestBody) Returns the list of collections matching the search string.- 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
@PostMapping(path="/collections/by-name") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponse getCollectionsByName(@PathVariable String serverName, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody 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
@PostMapping(path="/collections/by-collection-type") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionListResponse getCollectionsByType(@PathVariable String serverName, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) 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
@GetMapping(path="/collections/{collectionGUID}") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionResponse getCollection(@PathVariable String serverName, @PathVariable 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
@PostMapping(path="/collections") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createCollection(@PathVariable String serverName, @RequestParam(required=false) String classificationName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.rest.NewCollectionRequestBody requestBody) Create a new generic collection.- Parameters:
serverName- name of called server.classificationName- 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
@PostMapping(path="/collections/root-collection") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createRootCollection(@PathVariable String serverName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.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
@PostMapping(path="/collections/data-spec-collection") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createDataSpecCollection(@PathVariable String serverName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.rest.NewCollectionRequestBody requestBody) Create a new collection with the DataSpec classification. Used to identify a collection of data fields and schema types.- 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
@PostMapping(path="/collections/folder") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createFolderCollection(@PathVariable String serverName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.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
@PostMapping(path="/collections/from-template") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createCollectionFromTemplate(@PathVariable String serverName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.rest.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
@PostMapping(path="/digital-products") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createDigitalProduct(@PathVariable String serverName, @RequestBody org.odpi.openmetadata.viewservices.collectionmanager.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
@PostMapping(path="/collections/{collectionGUID}/update") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestParam boolean replaceAllProperties, @RequestBody org.odpi.openmetadata.accessservices.digitalservice.properties.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
@PostMapping(path="/digital-products/{collectionGUID}/update") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateDigitalProduct(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestParam boolean replaceAllProperties, @RequestBody org.odpi.openmetadata.accessservices.digitalservice.properties.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
@PostMapping(path="/metadata-elements/{parentGUID}/collections/{collectionGUID}/attach") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse attachCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @PathVariable String parentGUID, @RequestParam boolean makeAnchor, @RequestBody org.odpi.openmetadata.accessservices.digitalservice.properties.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
@PostMapping(path="/metadata-elements/{parentGUID}/collections/{collectionGUID}/detach") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse detachCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @PathVariable String parentGUID, @RequestBody(required=false) 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 to.- 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
@PostMapping(path="/collections/{collectionGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse deleteCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestBody(required=false) 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.- 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
@GetMapping(path="/collections/{collectionGUID}/members") public org.odpi.openmetadata.viewservices.collectionmanager.rest.CollectionMemberListResponse getCollectionMembers(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") 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
@PostMapping(path="/collections/{collectionGUID}/members/{elementGUID}/attach") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse addToCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @PathVariable String elementGUID, @RequestBody(required=false) org.odpi.openmetadata.accessservices.digitalservice.properties.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
@PostMapping(path="/collections/{collectionGUID}/members/{elementGUID}/update") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateCollectionMembership(@PathVariable String serverName, @PathVariable String collectionGUID, @PathVariable String elementGUID, @RequestParam boolean replaceAllProperties, @RequestBody org.odpi.openmetadata.accessservices.digitalservice.properties.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
@PostMapping(path="/collections/{collectionGUID}/members/{elementGUID}/detach") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse removeFromCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @PathVariable String elementGUID, @RequestBody 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.
-