Interface WatchdogGovernanceContext

All Superinterfaces:
GovernanceContext
All Known Implementing Classes:
GovernanceActionContext

public interface WatchdogGovernanceContext extends GovernanceContext
WatchdogGovernanceContext provides the watchdog governance action service with access to information about the request, open metadata store, the ability to register a listener to receive governance events and initiate new governance activity.
  • Method Details

    • registerListener

      void registerListener(WatchdogGovernanceListener listener, List<WatchdogEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) throws InvalidParameterException
      Register a listener to receive events about changes to metadata elements in the open metadata store. There can be only one registered listener. If this method is called more than once, the new parameters replace the existing parameters. This means the watchdog governance action service can change the listener and the parameters that control the types of events received while it is running. The types of events passed to the listener are controlled by the combination of the interesting event types and the interesting metadata types. That is an event is only passed to the listener if it matches both the interesting event types and the interesting metadata types. If specific instance, interestingEventTypes or interestingMetadataTypes are null, it defaults to "any". If the listener parameter is null, no more events are passed to the listener. The type name specified in the interestingMetadataTypes refers to the subject of the event - so it is the type of the metadata element for metadata element types, the type of the relationship for related elements events and the name of the classification for classification events.
      Parameters:
      listener - listener object to receive events
      interestingEventTypes - types of events that should be passed to the listener
      interestingMetadataTypes - types of elements that are the subject of the interesting event types
      specificInstance - unique identifier of a specific instance (metadata element or relationship) to watch for
      Throws:
      InvalidParameterException - one or more of the type names are unrecognized
    • disconnectListener

      void disconnectListener()
      Unregister the listener permanently from the event infrastructure.
    • initiateEngineAction

      String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String,String> requestParameters) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      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:
      qualifiedName - unique identifier to give this governance action
      domainIdentifier - governance domain associated with this action (0=ALL)
      displayName - display name for this action
      description - description for this action
      requestSourceGUIDs - request source elements for the resulting governance action service
      actionTargets - map of action target names to GUIDs for the resulting governance action service
      startTime - future start time or null for "as soon as possible".
      governanceEngineName - name of the governance engine to run the request
      requestType - request type to identify the governance action service to run
      requestParameters - properties to pass to the governance action service
      Returns:
      unique identifier of the governance action
      Throws:
      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
    • initiateEngineAction

      String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String,String> requestParameters, String processName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      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:
      qualifiedName - unique identifier to give this governance action
      domainIdentifier - governance domain associated with this action (0=ALL)
      displayName - display name for this action
      description - description for this action
      requestSourceGUIDs - request source elements for the resulting governance action service
      actionTargets - map of action target names to GUIDs for the resulting governance action service
      startTime - future start time or null for "as soon as possible".
      governanceEngineName - name of the governance engine to run the request
      requestType - request type to identify the governance action service to run
      requestParameters - properties to pass to the governance action service
      processName - name of the process that this action is a part of
      Returns:
      unique identifier of the governance action
      Throws:
      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
    • initiateGovernanceActionProcess

      String initiateGovernanceActionProcess(String processQualifiedName, Map<String,String> requestParameters, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Using the named governance action process as a template, initiate a chain of governance actions.
      Parameters:
      processQualifiedName - unique name of the governance action process to use
      requestParameters - request parameters to pass to the governance actions called in the governance action process
      requestSourceGUIDs - request source elements for the resulting governance action service
      actionTargets - map of action target names to GUIDs for the resulting governance action service
      startTime - future start time or null for "as soon as possible".
      Returns:
      unique identifier of the first governance action of the process
      Throws:
      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