Class SecurityGroupManagement

java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
org.odpi.openmetadata.accessservices.communityprofile.client.SecurityGroupManagement
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.communityprofile.api.RelatedElementsManagementInterface, org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface

public class SecurityGroupManagement extends CommunityProfileBaseClient implements org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
SecurityManagerClient is the client for explicitly managing the security groups.
  • Constructor Details

    • SecurityGroupManagement

      public SecurityGroupManagement(String serverName, String serverPlatformURLRoot, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - maximum value allowed for page size
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • SecurityGroupManagement

      public SecurityGroupManagement(String serverName, String serverPlatformURLRoot, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • SecurityGroupManagement

      public SecurityGroupManagement(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum value allowed for page size
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • SecurityGroupManagement

      public SecurityGroupManagement(String serverName, String serverPlatformURLRoot, String userId, String password, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad input parameters
    • SecurityGroupManagement

      public SecurityGroupManagement(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - pre-initialized REST client
      maxPageSize - pre-initialized parameter limit
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - there is a problem with the information about the remote OMAS
  • Method Details

    • createSecurityGroup

      public String createSecurityGroup(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Create a new security group. The type of the definition is located in the properties.
      Specified by:
      createSecurityGroup in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      userId - calling user
      properties - properties of the definition
      Returns:
      unique identifier of the definition
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing the metadata service
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • updateSecurityGroup

      public void updateSecurityGroup(String userId, String securityGroupGUID, boolean isMergeUpdate, org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties properties) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update an existing security group.
      Specified by:
      updateSecurityGroup in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      userId - calling user
      securityGroupGUID - unique identifier of the definition to update
      isMergeUpdate - are unspecified properties unchanged (true) or removed?
      properties - properties to update
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • deleteSecurityGroup

      public void deleteSecurityGroup(String userId, String securityGroupGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Delete a specific security group.
      Specified by:
      deleteSecurityGroup in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      userId - calling user
      securityGroupGUID - unique identifier of the definition to remove
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - guid is null or not known
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - security access problem
    • getSecurityGroupsForDistinguishedName

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement> getSecurityGroupsForDistinguishedName(String userId, String distinguishedName, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return the list of security groups associated with a unique distinguishedName. In an ideal world, there should be only one.
      Specified by:
      getSecurityGroupsForDistinguishedName in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      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
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the caller is not authorized to issue the request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - the metadata service has problems
    • getElementsGovernedBySecurityGroup

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub> getElementsGovernedBySecurityGroup(String userId, String securityGroupGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return the elements that are governed by the supplied security group.
      Specified by:
      getElementsGovernedBySecurityGroup in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      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
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the caller is not authorized to issue the request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - the metadata service has problems
    • findSecurityGroups

      public List<org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement> findSecurityGroups(String userId, String searchString, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return the list of security groups that match the search string - this can be a regular expression.
      Specified by:
      findSecurityGroups in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      userId - calling user
      searchString - 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
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the caller is not authorized to issue the request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - the metadata service has problems
    • getSecurityGroupByGUID

      public org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement getSecurityGroupByGUID(String userId, String securityGroupGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the userIdentity metadata element with the supplied unique identifier.
      Specified by:
      getSecurityGroupByGUID in interface org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface
      Parameters:
      userId - calling user
      securityGroupGUID - unique identifier of the requested metadata element
      Returns:
      matching metadata element
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)