Class GovernanceEngineRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.governanceengine.server.GovernanceEngineRESTServices
The GovernanceEngineRESTServices provides the server-side implementation of the services used by the governance
engine as it is managing requests to execute open governance services in the governance server.
These services align with the interface definitions from the Governance Action Framework (GAF).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclaimGovernanceAction
(String serverName, String userId, String governanceActionGUID, NullRequestBody requestBody) Request that execution of a governance action is allocated to the caller.findGovernanceActions
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of governance action metadata elements that contain the search string.getActiveClaimedGovernanceActions
(String serverName, String userId, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the governance actions that are still in process and that have been claimed by this caller's userId.getActiveGovernanceActions
(String serverName, String userId, int startFrom, int pageSize) Retrieve the governance actions that are still in process.getGovernanceAction
(String serverName, String userId, String governanceActionGUID) Request the status and properties of an executing governance action request.getGovernanceActions
(String serverName, String userId, int startFrom, int pageSize) Retrieve the governance actions that are known to the server.getGovernanceActionsByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of governance action metadata elements with a matching qualified or display name.getOutTopicConnection
(String serverName, String userId, String callerId) Return the connection object for the Governance Engine OMAS's out topic.logAssetAuditMessage
(String serverName, String userId, String assetGUID, String governanceService, String message) Log an audit message about this asset.updateGovernanceActionStatus
(String serverName, String userId, String governanceActionGUID, StatusRequestBody requestBody) Update the status of the governance action - providing the caller is permitted.
-
Constructor Details
-
GovernanceEngineRESTServices
public GovernanceEngineRESTServices()Default constructor
-
-
Method Details
-
getOutTopicConnection
public OCFConnectionResponse getOutTopicConnection(String serverName, String userId, String callerId) Return the connection object for the Governance Engine OMAS's out topic.- Parameters:
serverName
- name of the service to route the request to.userId
- identifier of calling user.callerId
- unique identifier of the caller- Returns:
- connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the governance engine definition.
-
logAssetAuditMessage
public VoidResponse logAssetAuditMessage(String serverName, String userId, String assetGUID, String governanceService, String message) Log an audit message about this asset.- Parameters:
serverName
- name of server instance to route request touserId
- userId of user making request.assetGUID
- unique identifier for asset.governanceService
- name of governance servicemessage
- message to log- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem that occurred within the property server.
-
updateGovernanceActionStatus
public VoidResponse updateGovernanceActionStatus(String serverName, String userId, String governanceActionGUID, StatusRequestBody requestBody) Update the status of the governance action - providing the caller is permitted.- Parameters:
serverName
- name of server instance to route request touserId
- identifier of calling usergovernanceActionGUID
- identifier of the governance action requestrequestBody
- new status ordinal- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
getGovernanceAction
public GovernanceActionElementResponse getGovernanceAction(String serverName, String userId, String governanceActionGUID) Request the status and properties of an executing governance action request.- Parameters:
serverName
- name of server instance to route request touserId
- identifier of calling usergovernanceActionGUID
- identifier of the governance action request.- Returns:
- governance action properties and status or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
claimGovernanceAction
public VoidResponse claimGovernanceAction(String serverName, String userId, String governanceActionGUID, NullRequestBody requestBody) Request that execution of a governance action is allocated to the caller.- Parameters:
serverName
- name of server instance to route request touserId
- identifier of calling usergovernanceActionGUID
- identifier of the governance action requestrequestBody
- null request body- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
getGovernanceActions
public GovernanceActionElementsResponse getGovernanceActions(String serverName, String userId, int startFrom, int pageSize) Retrieve the governance actions that are known to the server.- Parameters:
serverName
- name of server instance to route request touserId
- userId of callerstartFrom
- starting from elementpageSize
- maximum elements to return- Returns:
- list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
getActiveGovernanceActions
public GovernanceActionElementsResponse getActiveGovernanceActions(String serverName, String userId, int startFrom, int pageSize) Retrieve the governance actions that are still in process.- Parameters:
serverName
- name of server instance to route request touserId
- userId of callerstartFrom
- starting from elementpageSize
- maximum elements to return- Returns:
- list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
getActiveClaimedGovernanceActions
public GovernanceActionElementsResponse getActiveClaimedGovernanceActions(String serverName, String userId, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the governance actions that are still in process and that have been claimed by this caller's userId. This call is used when the caller restarts.- Parameters:
serverName
- name of server instance to route request touserId
- userId of callergovernanceEngineGUID
- unique identifier of governance enginestartFrom
- starting from elementpageSize
- maximum elements to return- Returns:
- list of governance action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
findGovernanceActions
public GovernanceActionElementsResponse findGovernanceActions(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of governance action 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 touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- 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 there is a problem reported in the open metadata server(s)
-
getGovernanceActionsByName
public GovernanceActionElementsResponse getGovernanceActionsByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of governance action 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 touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- name to search for- 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 there is a problem reported in the open metadata server(s)
-