Class GovernanceEngineClient
java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.client.OpenGovernanceClient
org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase
org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient
- All Implemented Interfaces:
org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface,org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceCompletionInterface,org.odpi.openmetadata.frameworks.governanceaction.client.SpecialGovernanceActionInterface
public class GovernanceEngineClient
extends org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase
implements org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
GovernanceEngineClient sits in the governance context of a governance action service when it is running in the engine host OMAG server.
It is however shared by all the governance action services running in an engine service so that we only need one connector to the topic
listener for the watchdog governance services.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase
governanceListenerManager, invalidParameterHandler, listenerIdFields inherited from class org.odpi.openmetadata.frameworks.governanceaction.client.OpenGovernanceClient
serverName, serverPlatformURLRoot -
Constructor Summary
ConstructorsConstructorDescriptionGovernanceEngineClient(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.GovernanceEngineClient(String serverName, String serverPlatformURLRoot, String serverUserId, String serverPassword) Create a new client that passes userId and password in each HTTP request.GovernanceEngineClient(String serverName, String serverPlatformURLRoot, GovernanceEngineRESTClient restClient, int maxPageSize) Create a new client that passes userId and password in each HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoidclaimGovernanceAction(String userId, String governanceActionGUID) Request that execution of a governance action is allocated to the caller.List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>findGovernanceActions(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of governance action type metadata elements that contain the search string.List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>getActiveClaimedGovernanceActions(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.List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>getActiveGovernanceActions(String userId, int startFrom, int pageSize) Retrieve the governance actions that are still in process.org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElementgetGovernanceAction(String userId, String governanceActionGUID) Request the status of an executing governance action request.List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>getGovernanceActions(String userId, int startFrom, int pageSize) Retrieve the governance actions known to the server.List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>getGovernanceActionsByName(String userId, String name, int startFrom, int pageSize) Retrieve the list of governance action type metadata elements with a matching qualified or display name.voidupdateGovernanceActionStatus(String userId, String governanceActionGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionStatus governanceActionStatus) Update the status of the governance action - providing the caller is permitted.Methods inherited from class org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase
disconnectListener, initiateGovernanceAction, initiateGovernanceActionProcess, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, recordCompletionStatus, registerListener, setListenerManager, updateActionTargetStatusMethods inherited from class org.odpi.openmetadata.frameworks.governanceaction.client.OpenGovernanceClient
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
recordCompletionStatus, updateActionTargetStatus
-
Constructor Details
-
GovernanceEngineClient
public GovernanceEngineClient(String serverName, String serverPlatformURLRoot) 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 toserverPlatformURLRoot- the network address of the server running the OMAS REST services- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceEngineClient
public GovernanceEngineClient(String serverName, String serverPlatformURLRoot, String serverUserId, String serverPassword) 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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesserverUserId- caller's userId embedded in all HTTP requestsserverPassword- caller's password embedded in all HTTP requests- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceEngineClient
public GovernanceEngineClient(String serverName, String serverPlatformURLRoot, GovernanceEngineRESTClient 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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesrestClient- pre-initialized REST clientmaxPageSize- 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
-
updateGovernanceActionStatus
public void updateGovernanceActionStatus(String userId, String governanceActionGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionStatus governanceActionStatus) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Update the status of the governance action - providing the caller is permitted.- Specified by:
updateGovernanceActionStatusin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- identifier of calling usergovernanceActionGUID- identifier of the governance action requestgovernanceActionStatus- new status enum- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
getGovernanceAction
public org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement getGovernanceAction(String userId, String governanceActionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Request the status of an executing governance action request.- Specified by:
getGovernanceActionin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- identifier of calling usergovernanceActionGUID- identifier of the governance action request.- Returns:
- status enum
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
claimGovernanceAction
public void claimGovernanceAction(String userId, String governanceActionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Request that execution of a governance action is allocated to the caller.- Specified by:
claimGovernanceActionin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- identifier of calling usergovernanceActionGUID- identifier of the governance action request.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
getGovernanceActions
public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getGovernanceActions(String userId, 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 Retrieve the governance actions known to the server.- Specified by:
getGovernanceActionsin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- userId of callerstartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of governance action elements
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
getActiveGovernanceActions
public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getActiveGovernanceActions(String userId, 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 Retrieve the governance actions that are still in process.- Specified by:
getActiveGovernanceActionsin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- userId of callerstartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of governance action elements
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
getActiveClaimedGovernanceActions
public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getActiveClaimedGovernanceActions(String userId, String governanceEngineGUID, 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 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.- Specified by:
getActiveClaimedGovernanceActionsin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- userId of callergovernanceEngineGUID- unique identifier of governance enginestartFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of governance action elements
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- user not authorized to issue this request.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there was a problem detected by the metadata store.
-
findGovernanceActions
public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> findGovernanceActions(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 Retrieve the list of governance action type metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findGovernanceActionsin interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
getGovernanceActionsByName
public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getGovernanceActionsByName(String userId, String name, 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 Retrieve the list of governance action type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getGovernanceActionsByNamein interfaceorg.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-