Class WatchdogActionEngineHandler

java.lang.Object
org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler
org.odpi.openmetadata.engineservices.watchdogaction.handlers.WatchdogActionEngineHandler

public class WatchdogActionEngineHandler extends GovernanceEngineHandler
The WatchdogActionEngineHandler is responsible for running watchdog action services on demand. It is initialized with the configuration for the watchdog action services it supports along with the clients to the asset properties store and annotations store.
  • Constructor Details

    • WatchdogActionEngineHandler

      public WatchdogActionEngineHandler(EngineConfig engineConfig, String localServerName, String partnerServerName, String partnerURLRoot, String serverUserId, OpenMetadataClient openMetadataClient, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, GovernanceContextClient governanceContextClient, AuditLog auditLog, int maxPageSize)
      Create a client-side object for calling a watchdog action engine.
      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
      openMetadataClient - access to the open metadata store
      configurationClient - client to retrieve the configuration
      engineActionClient - client to control the execution of governance action requests
      governanceContextClient - 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(OpenMetadataOutTopicEvent 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, PropertyServerException
      Run an instance of a watchdog action service in its own thread and return the handler (for disconnect processing).
      Specified by:
      runGovernanceService in class GovernanceEngineHandler
      Parameters:
      engineActionGUID - unique identifier of engine action to activate
      governanceRequestType - governance request type to use when calling the governance engine
      requesterUserId - original user requesting this governance service
      requestedStartDate - date/time to start the governance service
      requestParameters - name-value properties to control the governance service
      requestSourceElements - metadata elements associated with the request to the governance service
      actionTargetElements - metadata elements that need to be worked on by the governance service
      Throws:
      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 governance engine.