Class OpenGovernanceRESTServices
java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.server.OpenGovernanceRESTServices
The OpenGovernanceRESTServices 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 Open Survey Framework (OGF).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is stopped.claimEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is allocated to the caller.findEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of engine action metadata elements that contain the search string.getActiveClaimedEngineActions(String serverName, String serviceURLMarker, String userId, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the engine actions that are still in process and that have been claimed by this caller's userId.getActiveEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are still in process.getEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID) Request the status and properties of an executing engine action request.getEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are known to the server.getEngineActionsByName(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of engine action metadata elements with a matching qualified or display name.getGovernanceActionProcessGraph(String serverName, String serviceURLMarker, String userId, String processGUID, ResultsRequestBody requestBody) Retrieve the governance action process metadata element with the supplied unique identifier along with the flow definition describing its implementation.initiateEngineAction(String serverName, String serviceURLMarker, String userId, String governanceEngineName, InitiateEngineActionRequestBody requestBody) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type.initiateGovernanceActionProcess(String serverName, String serviceURLMarker, String userId, InitiateGovernanceActionProcessRequestBody requestBody) Using the named governance action process as a template, initiate a chain of governance actions.initiateGovernanceActionType(String serverName, String serviceURLMarker, String userId, InitiateGovernanceActionTypeRequestBody requestBody) Using the named governance action type as a template, initiate an engine action.linkConsolidatedDuplicate(String serverName, String serviceURLMarker, String userId, ConsolidatedDuplicatesRequestBody requestBody) Identify an element that acts as a consolidated version for a set of duplicate elements.linkElementsAsDuplicates(String serverName, String serviceURLMarker, String userId, PeerDuplicatesRequestBody requestBody) Link elements as peer duplicates.recordCompletionStatus(String serverName, String serviceURLMarker, String userId, String governanceActionGUID, CompletionStatusRequestBody requestBody) Declare that all the processing for the governance action service is finished and the status of the work.updateActionTargetStatus(String serverName, String serviceURLMarker, String userId, ActionTargetStatusRequestBody requestBody) Update the status of a specific action target.updateEngineActionStatus(String serverName, String serviceURLMarker, String userId, String engineActionGUID, EngineActionStatusRequestBody requestBody) Update the status of the engine action - providing the caller is permitted.
-
Constructor Details
-
OpenGovernanceRESTServices
public OpenGovernanceRESTServices()Default constructor
-
-
Method Details
-
getGovernanceActionProcessGraph
public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(String serverName, String serviceURLMarker, String userId, String processGUID, ResultsRequestBody requestBody) Retrieve the governance action process metadata element with the supplied unique identifier along with the flow definition describing its implementation.- Parameters:
serverName- name of the service to route the request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- calling userprocessGUID- unique identifier of the requested metadata element- Returns:
- requested metadata element 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)
-
getEngineAction
public EngineActionElementResponse getEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID) Request the status and properties of an executing engine action request.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- identifier of calling userengineActionGUID- identifier of the engine action request.- Returns:
- engine 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.
-
getEngineActions
public EngineActionElementsResponse getEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are known to the server.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- userId of callerstartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of engine 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.
-
getActiveEngineActions
public EngineActionElementsResponse getActiveEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize) Retrieve the engine actions that are still in process.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- userId of callerstartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of engine 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.
-
getActiveClaimedEngineActions
public EngineActionElementsResponse getActiveClaimedEngineActions(String serverName, String serviceURLMarker, String userId, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the engine 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 toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- userId of callergovernanceEngineGUID- unique identifier of governance enginestartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of engine 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.
-
findEngineActions
public EngineActionElementsResponse findEngineActions(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of engine 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 toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- 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)
-
getEngineActionsByName
public EngineActionElementsResponse getEngineActionsByName(String serverName, String serviceURLMarker, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of engine 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 toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- 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)
-
claimEngineAction
public VoidResponse claimEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is allocated to the caller.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- identifier of calling userengineActionGUID- identifier of the engine 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.
-
cancelEngineAction
public VoidResponse cancelEngineAction(String serverName, String serviceURLMarker, String userId, String engineActionGUID, NullRequestBody requestBody) Request that execution of an engine action is stopped.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- identifier of calling userengineActionGUID- identifier of the engine 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.
-
updateEngineActionStatus
public VoidResponse updateEngineActionStatus(String serverName, String serviceURLMarker, String userId, String engineActionGUID, EngineActionStatusRequestBody requestBody) Update the status of the engine action - providing the caller is permitted.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- identifier of calling userengineActionGUID- identifier of the engine 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.
-
linkElementsAsDuplicates
public VoidResponse linkElementsAsDuplicates(String serverName, String serviceURLMarker, String userId, PeerDuplicatesRequestBody requestBody) Link elements as peer duplicates. Create a simple relationship between two elements. If the relationship already exists, the properties are updated.- Parameters:
serverName- name of the service to route the request to.serviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- calling userrequestBody- parameters for the relationship- Returns:
- void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkConsolidatedDuplicate
public VoidResponse linkConsolidatedDuplicate(String serverName, String serviceURLMarker, String userId, ConsolidatedDuplicatesRequestBody requestBody) Identify an element that acts as a consolidated version for a set of duplicate elements. (The consolidated element is created using createMetadataElement.) Creates a simple relationship between the elements. If the ConsolidatedDuplicate classification already exists, the properties are updated.- Parameters:
serverName- name of the service to route the request to.serviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- calling userrequestBody- parameters for the relationship- Returns:
- void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updateActionTargetStatus
public VoidResponse updateActionTargetStatus(String serverName, String serviceURLMarker, String userId, ActionTargetStatusRequestBody requestBody) Update the status of a specific action target. By default, these values are derived from the values for the governance action service. However, if the governance action service has to process name target elements, then setting the status on each individual target will show the progress of the governance action service.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- caller's userIdrequestBody- relationship properties- Returns:
- void or InvalidParameterException the action target GUID is not recognized UserNotAuthorizedException the governance action service is not authorized to update the action target properties PropertyServerException there is a problem connecting to the metadata store
-
recordCompletionStatus
public VoidResponse recordCompletionStatus(String serverName, String serviceURLMarker, String userId, String governanceActionGUID, CompletionStatusRequestBody requestBody) Declare that all the processing for the governance action service is finished and the status of the work.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- caller's userIdgovernanceActionGUID- unique identifier of the governance action to updaterequestBody- completion status enum value, optional guard strings for triggering subsequent action(s) plus a list of additional elements to add to the action targets for the next phase- Returns:
- void or InvalidParameterException the completion status is null UserNotAuthorizedException the governance action service is not authorized to update the governance action service status PropertyServerException there is a problem connecting to the metadata store
-
initiateEngineAction
public GUIDResponse initiateEngineAction(String serverName, String serviceURLMarker, String userId, String governanceEngineName, InitiateEngineActionRequestBody requestBody) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type. The governance action remains to act as a record of the actions taken for auditing.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- caller's userIdgovernanceEngineName- name of the governance engine that should execute the requestrequestBody- properties for the governance action and to pass to the governance action service- Returns:
- unique identifier of the governance action or InvalidParameterException null qualified name UserNotAuthorizedException this governance action service is not authorized to create a governance action PropertyServerException there is a problem with the metadata store
-
initiateGovernanceActionType
public GUIDResponse initiateGovernanceActionType(String serverName, String serviceURLMarker, String userId, InitiateGovernanceActionTypeRequestBody requestBody) Using the named governance action type as a template, initiate an engine action.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- caller's userIdrequestBody- properties to initiate the new instance of the engine action- Returns:
- unique identifier of the first governance action of the process or InvalidParameterException null or unrecognized qualified name of the process UserNotAuthorizedException this governance action service is not authorized to create a governance action process PropertyServerException there is a problem with the metadata store
-
initiateGovernanceActionProcess
public GUIDResponse initiateGovernanceActionProcess(String serverName, String serviceURLMarker, String userId, InitiateGovernanceActionProcessRequestBody requestBody) Using the named governance action process as a template, initiate a chain of governance actions.- Parameters:
serverName- name of server instance to route request toserviceURLMarker- the identifier of the access service (for example asset-owner for the Asset Owner OMAS)userId- caller's userIdrequestBody- properties to initiate the new instance of the process- Returns:
- unique identifier of the governance action process instance or InvalidParameterException null or unrecognized qualified name of the process UserNotAuthorizedException this governance action service is not authorized to create a governance action process PropertyServerException there is a problem with the metadata store
-