Class SecurityGroupRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.SecurityGroupRESTServices
The OrganizationRESTServices provides the server-side implementation of the Community Profile Open Metadata
Assess Service (OMAS) capability for organization management. This interface provides support for creating all types of actor profiles and
associated user roles in order to describe the structure of an organization.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSecurityGroup
(String serverName, String userId, SecurityGroupProperties requestBody) Create a new security group.deleteSecurityGroup
(String serverName, String userId, String securityGroupGUID, NullRequestBody requestBody) Delete a specific security group.findSecurityGroups
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Return the list of security groups that match the search string - this can be a regular expression.getElementsGovernedBySecurityGroup
(String serverName, String userId, String securityGroupGUID, int startFrom, int pageSize) Return the elements that are governed by the supplied security group.getSecurityGroupByGUID
(String serverName, String userId, String securityGroupGUID) Return information about a specific actor profile.getSecurityGroupsForDistinguishedName
(String serverName, String userId, String distinguishedName, int startFrom, int pageSize) Return the list of security groups associated with a unique distinguishedName.updateSecurityGroup
(String serverName, String userId, String securityGroupGUID, boolean isMergeUpdate, SecurityGroupProperties requestBody) Update an existing security group.
-
Constructor Details
-
SecurityGroupRESTServices
public SecurityGroupRESTServices()Default constructor
-
-
Method Details
-
createSecurityGroup
public GUIDResponse createSecurityGroup(String serverName, String userId, SecurityGroupProperties requestBody) Create a new security group. The type of the definition is located in the requestBody.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- 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
public VoidResponse updateSecurityGroup(String serverName, String userId, String securityGroupGUID, boolean isMergeUpdate, SecurityGroupProperties requestBody) Update an existing security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique identifier of the definition to updateisMergeUpdate
- 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
public VoidResponse deleteSecurityGroup(String serverName, String userId, String securityGroupGUID, NullRequestBody requestBody) Delete a specific security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique identifier of the definition to removerequestBody
- null request body- Returns:
- void or InvalidParameterException guid is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getSecurityGroupsForDistinguishedName
public SecurityGroupsResponse getSecurityGroupsForDistinguishedName(String serverName, String userId, String distinguishedName, int startFrom, int pageSize) Return the list of security groups associated with a unique distinguishedName. In an ideal world, there should be only one.- Parameters:
serverName
- called serveruserId
- calling userdistinguishedName
- unique name of the security groupstartFrom
- where to start from in the list of definitionspageSize
- 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
public ElementStubsResponse getElementsGovernedBySecurityGroup(String serverName, String userId, String securityGroupGUID, int startFrom, int pageSize) Return the elements that are governed by the supplied security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique name of the security groupstartFrom
- where to start from in the list of definitionspageSize
- 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
public SecurityGroupsResponse findSecurityGroups(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Return the list of security groups that match the search string - this can be a regular expression.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- value to search forstartFrom
- where to start from in the list of definition resultspageSize
- 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
public SecurityGroupResponse getSecurityGroupByGUID(String serverName, String userId, String securityGroupGUID) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- 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
-