Class GovernanceActionEngineHandler
java.lang.Object
org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
org.odpi.openmetadata.engineservices.governanceaction.handlers.GovernanceActionEngineHandler
The GovernanceActionEngineHandler is responsible for running governance action services on demand. It is initialized
with the configuration for the governance action services it supports along with the clients to the
asset properties store and annotations store.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
auditLog, configurationClient, engineActionClient, engineUserId, governanceEngineGUID, governanceEngineName, governanceEngineProperties, maxPageSize, serverName, serverUserId
-
Constructor Summary
ConstructorDescriptionGovernanceActionEngineHandler
(EngineConfig engineConfig, String localServerName, String partnerServerName, String partnerURLRoot, String serverUserId, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, GovernanceContextClient governanceContextClient, AuditLog auditLog, int maxPageSize) Create a client-side object for calling a governance action engine. -
Method Summary
Modifier and TypeMethodDescriptionvoid
publishWatchdogEvent
(WatchdogGovernanceEvent watchdogGovernanceEvent) Pass on the watchdog event to any governance service that supports them.void
runGovernanceService
(String engineActionGUID, String governanceRequestType, String requesterUserId, Date requestedStartDate, Map<String, String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements) Run an instance of a governance action service in its own thread and return the handler (for disconnect processing).Methods inherited from class org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
executeEngineAction, getGovernanceEngineElement, getGovernanceEngineName, getServiceCache, getSummary, refreshConfig, refreshServiceConfig, restartGovernanceService, restartServices, startServiceExecutionThread, terminate, validateGovernanceEngineInitialized
-
Constructor Details
-
GovernanceActionEngineHandler
public GovernanceActionEngineHandler(EngineConfig engineConfig, String localServerName, String partnerServerName, String partnerURLRoot, String serverUserId, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, GovernanceContextClient governanceContextClient, AuditLog auditLog, int maxPageSize) Create a client-side object for calling a governance action engine. Notice there are two instances of the GovernanceContextClient. It is possible that they are pointing at different metadata server instances so do not consolidate them into one client (even if IntelliJ begs you to :)).- Parameters:
engineConfig
- the unique identifier of the governance action engine.localServerName
- the name of the engine host server where the governance action engine is runningpartnerServerName
- name of partner serverpartnerURLRoot
- partner platformserverUserId
- user id for the server to useconfigurationClient
- client to retrieve the configurationengineActionClient
- client to control the execution of governance action requestsgovernanceContextClient
- REST client for calls made by the governance action servicesauditLog
- logging destinationmaxPageSize
- maximum number of results that can be returned in a single request
-
-
Method Details
-
publishWatchdogEvent
public void publishWatchdogEvent(WatchdogGovernanceEvent watchdogGovernanceEvent) throws InvalidParameterException Pass on the watchdog event to any governance service that supports them.- Parameters:
watchdogGovernanceEvent
- element describing the changing metadata data.- Throws:
InvalidParameterException
- Vital fields of the governance action are not filled out
-
runGovernanceService
public void runGovernanceService(String engineActionGUID, String governanceRequestType, String requesterUserId, Date requestedStartDate, Map<String, String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRun an instance of a governance action service in its own thread and return the handler (for disconnect processing).- Specified by:
runGovernanceService
in classGovernanceEngineHandler
- Parameters:
engineActionGUID
- unique identifier of the engin action to rungovernanceRequestType
- governance request type to use when calling the governance enginerequesterUserId
- original user requesting this governance servicerequestedStartDate
- date/time to start the governance action servicerequestParameters
- name-value properties to control the governance action servicerequestSourceElements
- metadata elements associated with the request to the governance action serviceactionTargetElements
- metadata elements that need to be worked on by the governance action service- Throws:
InvalidParameterException
- one of the parameters is null or invalid.UserNotAuthorizedException
- access permissions problemPropertyServerException
- there was a problem detected by the governance action engine.
-