Class CommunityMattersRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.communitymatters.server.CommunityMattersRESTServices
The CommunityMattersRESTServices provides the server-side implementation of the Community Matters Open Metadata
View Service (OMVS). This interface provides support for communities and their members.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCommunity(String serverName, NewElementRequestBody requestBody) Create a community.createCommunityFromTemplate(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent a community using an existing metadata element as a template.deleteCommunity(String serverName, String communityGUID, DeleteElementRequestBody requestBody) Delete a community.detachCrowdSourcingContribution(String serverName, String elementGUID, String contributorGUID, DeleteRelationshipRequestBody requestBody) Detach an actor from an element that they contributed to.findCommunities(String serverName, SearchStringRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.getCommunitiesByName(String serverName, FilterRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.getCommunityByGUID(String serverName, String communityGUID, GetRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.linkCrowdSourcingContribution(String serverName, String elementGUID, String contributorGUID, NewRelationshipRequestBody requestBody) Attach an actor to an element that they contributed to.updateCommunity(String serverName, String communityGUID, UpdateElementRequestBody requestBody) Update the properties of a community.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
CommunityMattersRESTServices
public CommunityMattersRESTServices()Default constructor
-
-
Method Details
-
createCommunity
Create a community.- Parameters:
serverName- name of called server.requestBody- properties for the community.- Returns:
- unique identifier of the newly created element InvalidParameterException one of the parameters is invalid. PropertyServerException a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createCommunityFromTemplate
Create a new metadata element to represent a community using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.- 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 a problem reported in the open metadata server(s)
-
updateCommunity
public BooleanResponse updateCommunity(String serverName, String communityGUID, UpdateElementRequestBody requestBody) Update the properties of a community.- Parameters:
serverName- name of called server.communityGUID- unique identifier of the community (returned from create)requestBody- properties for the new element.- Returns:
- boolean or InvalidParameterException one of the parameters is invalid. PropertyServerException a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteCommunity
public VoidResponse deleteCommunity(String serverName, String communityGUID, DeleteElementRequestBody requestBody) Delete a community.- Parameters:
serverName- name of called servercommunityGUID- unique identifier of the element to deleterequestBody- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getCommunitiesByName
public OpenMetadataRootElementsResponse getCommunitiesByName(String serverName, FilterRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.- Parameters:
serverName- name of the service to route the request torequestBody- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
-
getCommunityByGUID
public OpenMetadataRootElementResponse getCommunityByGUID(String serverName, String communityGUID, GetRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.- Parameters:
serverName- name of the service to route the request tocommunityGUID- unique identifier of the required elementrequestBody- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
-
findCommunities
public OpenMetadataRootElementsResponse findCommunities(String serverName, SearchStringRequestBody requestBody) Retrieve the list of community metadata elements that contain the search string.- Parameters:
serverName- name of the service to route the request torequestBody- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
-
linkCrowdSourcingContribution
public VoidResponse linkCrowdSourcingContribution(String serverName, String elementGUID, String contributorGUID, NewRelationshipRequestBody requestBody) Attach an actor to an element that they contributed to.- Parameters:
serverName- name of the server to route the request toelementGUID- unique identifier of the element that was contributed tocontributorGUID- unique identifier of the actor that made the contributionrequestBody- properties for the relationship- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
-
detachCrowdSourcingContribution
public VoidResponse detachCrowdSourcingContribution(String serverName, String elementGUID, String contributorGUID, DeleteRelationshipRequestBody requestBody) Detach an actor from an element that they contributed to.- Parameters:
serverName- name of the server to route the request toelementGUID- unique identifier of the element that was contributed tocontributorGUID- unique identifier of the actor that made the contributionrequestBody- delete options- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException a problem reported in the open metadata server(s)
-