Class GovernanceActionEngineHandler

java.lang.Object
org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
org.odpi.openmetadata.engineservices.governanceaction.handlers.GovernanceActionEngineHandler

public class GovernanceActionEngineHandler extends org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GovernanceActionEngineHandler(org.odpi.openmetadata.adminservices.configuration.properties.EngineConfig engineConfig, String localServerName, String partnerServerName, String partnerURLRoot, String serverUserId, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineConfigurationClient configurationClient, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient serverClient, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient governanceEngineClient, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, int maxPageSize)
    Create a client-side object for calling a governance action engine.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    publishWatchdogEvent(org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogGovernanceEvent watchdogGovernanceEvent)
    Pass on the watchdog event to any governance service that supports them.
    org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceHandler
    runGovernanceService(String governanceActionGUID, String governanceRequestType, Date startDate, Map<String,String> requestParameters, List<org.odpi.openmetadata.frameworks.governanceaction.properties.RequestSourceElement> requestSourceElements, List<org.odpi.openmetadata.frameworks.governanceaction.properties.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

    executeGovernanceAction, getGovernanceEngineName, getSummary, refreshConfig, refreshServiceConfig, terminate

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GovernanceActionEngineHandler

      public GovernanceActionEngineHandler(org.odpi.openmetadata.adminservices.configuration.properties.EngineConfig engineConfig, String localServerName, String partnerServerName, String partnerURLRoot, String serverUserId, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineConfigurationClient configurationClient, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient serverClient, org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient governanceEngineClient, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, int maxPageSize)
      Create a client-side object for calling a governance action engine. Notice there are two instances of the GovernanceEngineClient. 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 running
      partnerServerName - name of partner server
      partnerURLRoot - partner platform
      serverUserId - user id for the server to use
      configurationClient - client to retrieve the configuration
      serverClient - client to control the execution of governance action requests
      governanceEngineClient - REST client for calls made by the governance action services
      auditLog - logging destination
      maxPageSize - maximum number of results that can be returned in a single request
  • Method Details

    • publishWatchdogEvent

      public void publishWatchdogEvent(org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogGovernanceEvent watchdogGovernanceEvent) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Pass on the watchdog event to any governance service that supports them.
      Overrides:
      publishWatchdogEvent in class org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
      Parameters:
      watchdogGovernanceEvent - element describing the changing metadata data.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - Vital fields of the governance action are not filled out
    • runGovernanceService

      public org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceHandler runGovernanceService(String governanceActionGUID, String governanceRequestType, Date startDate, Map<String,String> requestParameters, List<org.odpi.openmetadata.frameworks.governanceaction.properties.RequestSourceElement> requestSourceElements, List<org.odpi.openmetadata.frameworks.governanceaction.properties.ActionTargetElement> actionTargetElements) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Run an instance of a governance action service in its own thread and return the handler (for disconnect processing).
      Specified by:
      runGovernanceService in class org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
      Parameters:
      governanceActionGUID - unique identifier of the asset to analyse
      governanceRequestType - governance request type to use when calling the governance engine
      startDate - date/time to start the governance action service
      requestParameters - name-value properties to control the governance action service
      requestSourceElements - metadata elements associated with the request to the governance action service
      actionTargetElements - metadata elements that need to be worked on by the governance action service
      Returns:
      service handler for this request
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the governance action engine.