Class CollectionRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.CollectionRESTServices
CollectionRESTServices provides the API operations to create and maintain collection information.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCollection
(String serverName, String userId, ReferenceableRequestBody requestBody) Create a new metadata element to represent a collection.createFolderCollection
(String serverName, String userId, ReferenceableRequestBody requestBody) Create a new metadata element to represent a collection.findCollections
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of collection metadata elements that contain the search string.getCollectionByGUID
(String serverName, String userId, String guid) Retrieve the collection metadata element with the supplied unique identifier.getCollectionMembers
(String serverName, String userId, String collectionGUID, int startFrom, int pageSize) Return information about a person role connected to the named collection.getCollections
(String serverName, String userId, String parentGUID, int startFrom, int pageSize) Retrieve the list of collection metadata elements with a matching qualified or display name.getCollectionsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of collection metadata elements with a matching qualified or display name.removeCollection
(String serverName, String userId, String collectionGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a collection.removeFromCollection
(String serverName, String userId, String collectionGUID, String collectionRoleGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a collection and a role.updateCollection
(String serverName, String userId, String collectionGUID, boolean isMergeUpdate, ReferenceableRequestBody requestBody) Update the metadata element representing a collection.updateCollectionMembership
(String serverName, String userId, String collectionGUID, String collectionRoleGUID, boolean isMergeUpdate, RelationshipRequestBody requestBody) Create a relationship between a collection and a person role.
-
Constructor Details
-
CollectionRESTServices
public CollectionRESTServices()Default constructor
-
-
Method Details
-
createCollection
public GUIDResponse createCollection(String serverName, String userId, ReferenceableRequestBody requestBody) Create a new metadata element to represent a collection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- properties to store- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createFolderCollection
public GUIDResponse createFolderCollection(String serverName, String userId, ReferenceableRequestBody requestBody) Create a new metadata element to represent a collection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- properties to store- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateCollection
public VoidResponse updateCollection(String serverName, String userId, String collectionGUID, boolean isMergeUpdate, ReferenceableRequestBody requestBody) Update the metadata element representing a collection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usercollectionGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with the existing properties of overlay them?requestBody
- new properties for this element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateCollectionMembership
public VoidResponse updateCollectionMembership(String serverName, String userId, String collectionGUID, String collectionRoleGUID, boolean isMergeUpdate, RelationshipRequestBody requestBody) Create a relationship between a collection and a person role.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usercollectionGUID
- unique identifier of the collection in the external data managercollectionRoleGUID
- unique identifier of the person role in the external data managerisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?requestBody
- relationship properties- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeFromCollection
public VoidResponse removeFromCollection(String serverName, String userId, String collectionGUID, String collectionRoleGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a collection and a role.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usercollectionGUID
- unique identifier of the collection in the external data managercollectionRoleGUID
- unique identifier of the role in the external data managerrequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeCollection
public VoidResponse removeCollection(String serverName, String userId, String collectionGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a collection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usercollectionGUID
- unique identifier of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findCollections
public CollectionsResponse findCollections(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of collection metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getCollectionsByName
public CollectionsResponse getCollectionsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of collection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getCollectionMembers
public CollectionMembersResponse getCollectionMembers(String serverName, String userId, String collectionGUID, int startFrom, int pageSize) Return information about a person role connected to the named collection.- Parameters:
serverName
- called serveruserId
- calling usercollectionGUID
- unique identifier for the collectionstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching person roles InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getCollections
public CollectionsResponse getCollections(String serverName, String userId, String parentGUID, int startFrom, int pageSize) Retrieve the list of collection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userparentGUID
- unique identifier of referenceable object (typically a personal profile, project or community) that the collections hang off of.startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getCollectionByGUID
Retrieve the collection metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-