java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.spring.SecurityGroupResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/community-profile/users/{userId}") public class SecurityGroupResource extends Object
The SecurityGroupResource provides a Spring based server-side REST API that supports the SecruityGroupManagementInterface. It delegates each request to the SecurityGroupRESTServices. This provides the server-side implementation of the Community Profile Open Metadata Access Service (OMAS) which is used to manage information about people, roles and organizations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse
    createSecurityGroup(String serverName, String userId, org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties requestBody)
    Create a new security group.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    deleteSecurityGroup(String serverName, String userId, String securityGroupGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody)
    Delete a specific security group.
    org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse
    findSecurityGroups(String serverName, String userId, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody requestBody)
    Return the list of security groups that match the search string - this can be a regular expression.
    org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse
    getElementsGovernedBySecurityGroup(String serverName, String userId, String securityGroupGUID, int startFrom, int pageSize)
    Return the elements that are governed by the supplied security group.
    org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse
    getSecurityGroupByGUID(String serverName, String userId, String securityGroupGUID)
    Return information about a specific actor profile.
    org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse
    getSecurityGroupsForDistinguishedName(String serverName, String userId, String distinguishedName, int startFrom, int pageSize)
    Return the list of security groups associated with a unique distinguishedName.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    updateSecurityGroup(String serverName, String userId, String securityGroupGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties requestBody)
    Update an existing security group.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecurityGroupResource

      public SecurityGroupResource()
      Default constructor
  • Method Details

    • createSecurityGroup

      @PostMapping("/security-groups") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createSecurityGroup(@PathVariable String serverName, @PathVariable String userId, @RequestBody org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties requestBody)
      Create a new security group. The type of the definition is located in the requestBody.
      Parameters:
      serverName - called server
      userId - calling user
      requestBody - requestBody of the definition
      Returns:
      unique identifier of the definition or InvalidParameterException typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid PropertyServerException problem accessing the metadata service UserNotAuthorizedException security access problem
    • updateSecurityGroup

      @PostMapping("/security-groups/{securityGroupGUID}/update") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateSecurityGroup(@PathVariable String serverName, @PathVariable String userId, @PathVariable String securityGroupGUID, @RequestParam boolean isMergeUpdate, @RequestBody org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties requestBody)
      Update an existing security group.
      Parameters:
      serverName - called server
      userId - calling user
      securityGroupGUID - unique identifier of the definition to update
      isMergeUpdate - are unspecified properties unchanged (true) or removed?
      requestBody - properties to update
      Returns:
      void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • deleteSecurityGroup

      @PostMapping("/security-groups/{securityGroupGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse deleteSecurityGroup(@PathVariable String serverName, @PathVariable String userId, @PathVariable String securityGroupGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody)
      Delete a specific security group.
      Parameters:
      serverName - called server
      userId - calling user
      securityGroupGUID - unique identifier of the definition to remove
      requestBody - null request body
      Returns:
      void or InvalidParameterException guid is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
    • getSecurityGroupsForDistinguishedName

      @GetMapping("/security-groups/for-distinguished-name/{distinguishedName}") public org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse getSecurityGroupsForDistinguishedName(@PathVariable String serverName, @PathVariable String userId, @PathVariable String distinguishedName, @RequestParam int startFrom, @RequestParam int pageSize)
      Return the list of security groups associated with a unique distinguishedName. In an ideal world, the should be only one.
      Parameters:
      serverName - called server
      userId - calling user
      distinguishedName - unique name of the security group
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of security groups or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
    • getElementsGovernedBySecurityGroup

      @GetMapping("/security-groups/{securityGroupGUID}/governed-by/elements") public org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse getElementsGovernedBySecurityGroup(@PathVariable String serverName, @PathVariable String userId, @PathVariable String securityGroupGUID, @RequestParam int startFrom, @RequestParam int pageSize)
      Return the elements that are governed by the supplied security group.
      Parameters:
      serverName - called server
      userId - calling user
      securityGroupGUID - unique name of the security group
      startFrom - where to start from in the list of definitions
      pageSize - max number of results to return in one call
      Returns:
      list of headers for the associated elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
    • findSecurityGroups

      @PostMapping("/security-groups/by-search-string") public org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse findSecurityGroups(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody requestBody)
      Return the list of security groups that match the search string - this can be a regular expression.
      Parameters:
      serverName - called server
      userId - calling user
      requestBody - value to search for
      startFrom - where to start from in the list of definition results
      pageSize - max number of results to return in one call
      Returns:
      list of security groups or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
    • getSecurityGroupByGUID

      @GetMapping("/security-groups/{securityGroupGUID}") public org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse getSecurityGroupByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String securityGroupGUID)
      Return information about a specific actor profile.
      Parameters:
      serverName - called server
      userId - calling user
      securityGroupGUID - unique identifier for the actor profile
      Returns:
      properties of the actor profile InvalidParameterException securityGroupGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem