java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.CommunityRESTServices

public class CommunityRESTServices extends Object
CommunityRESTServices provides the API operations to create and maintain community information.
  • Constructor Details

    • CommunityRESTServices

      public CommunityRESTServices()
      Default constructor
  • Method Details

    • createCommunity

      public GUIDResponse createCommunity(String serverName, String userId, ReferenceableRequestBody requestBody)
      Create a new metadata element to represent a community.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - 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)
    • createCommunityFromTemplate

      public GUIDResponse createCommunityFromTemplate(String serverName, String userId, String templateGUID, TemplateRequestBody requestBody)
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      templateGUID - unique identifier of the metadata element to copy
      requestBody - properties that override the template
      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)
    • updateCommunity

      public VoidResponse updateCommunity(String serverName, String userId, String communityGUID, boolean isMergeUpdate, ReferenceableRequestBody requestBody)
      Update the metadata element representing a community.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      communityGUID - unique identifier of the metadata element to update
      isMergeUpdate - 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)
    • setupCommunityRole

      public VoidResponse setupCommunityRole(String serverName, String userId, String communityGUID, String communityRoleGUID, RelationshipRequestBody requestBody)
      Create a relationship between a community and a person role.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      communityGUID - unique identifier of the community in the external data manager
      communityRoleGUID - unique identifier of the person role in the external data manager
      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)
    • clearCommunityRole

      public VoidResponse clearCommunityRole(String serverName, String userId, String communityGUID, String communityRoleGUID, ExternalSourceRequestBody requestBody)
      Remove a relationship between a community and a role.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      communityGUID - unique identifier of the community in the external data manager
      communityRoleGUID - unique identifier of the role in the external data manager
      requestBody - 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)
    • removeCommunity

      public VoidResponse removeCommunity(String serverName, String userId, String communityGUID, ExternalSourceRequestBody requestBody)
      Remove the metadata element representing a community.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      communityGUID - unique identifier of the metadata element to remove
      requestBody - 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)
    • findCommunities

      public CommunitiesResponse findCommunities(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of community 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 user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - 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)
    • getCommunitiesByName

      public CommunitiesResponse getCommunitiesByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of community 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 user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - 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)
    • getRolesForCommunity

      public PersonRolesResponse getRolesForCommunity(String serverName, String userId, String communityGUID, int startFrom, int pageSize)
      Return information about a person role connected to the named community.
      Parameters:
      serverName - called server
      userId - calling user
      communityGUID - unique identifier for the community
      startFrom - 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
    • getCommunities

      public CommunitiesResponse getCommunities(String serverName, String userId, int startFrom, int pageSize)
      Retrieve the list of community 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 user
      startFrom - paging start point
      pageSize - 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)
    • getCommunityByGUID

      public CommunityResponse getCommunityByGUID(String serverName, String userId, String guid)
      Retrieve the community metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      guid - 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)