Interface WatchdogGovernanceContext
- All Superinterfaces:
GovernanceContext
- All Known Implementing Classes:
GovernanceActionContext
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 Summary
Modifier and TypeMethodDescriptionvoid
Unregister the listener permanently from the event infrastructure.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) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type.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) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type.initiateGovernanceActionProcess
(String processQualifiedName, Map<String, String> requestParameters, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime) Using the named governance action process as a template, initiate a chain of governance actions.initiateGovernanceActionType
(String governanceActionTypeQualifiedName, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action type as a template, initiate an engine action.void
registerListener
(WatchdogGovernanceListener listener, List<WatchdogEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) Register a listener to receive events about changes to metadata elements in the open metadata store.Methods inherited from interface org.odpi.openmetadata.frameworks.governanceaction.GovernanceContext
addCatalogTarget, createGovernanceEngine, createGovernanceService, createIncidentReport, createIntegrationConnector, createIntegrationGroup, deleteGovernanceEngine, deleteGovernanceService, deleteIntegrationConnector, deleteIntegrationGroup, getActionTargetElements, getAllGovernanceEngines, getAllGovernanceServices, getAllIntegrationConnectors, getAllIntegrationGroups, getCatalogTarget, getCatalogTargets, getCompletionStatus, getEngineActionGUID, getGovernanceEngineByGUID, getGovernanceEngineByName, getGovernanceServiceByGUID, getGovernanceServiceByName, getGovernanceServiceRegistrations, getIntegrationConnectorByGUID, getIntegrationConnectorByName, getIntegrationConnectorRegistrations, getIntegrationGroupByGUID, getIntegrationGroupByName, getMaxPageSize, getOpenMetadataStore, getRegisteredGovernanceService, getRegisteredGovernanceServices, getRegisteredIntegrationConnector, getRegisteredIntegrationConnectors, getRequesterUserId, getRequestParameters, getRequestSourceElements, getRequestType, recordCompletionStatus, recordCompletionStatus, recordCompletionStatus, recordCompletionStatus, recordCompletionStatus, registerGovernanceServiceWithEngine, registerGovernanceServiceWithEngine, registerIntegrationConnectorWithGroup, removeCatalogTarget, unregisterGovernanceServiceFromEngine, unregisterIntegrationConnectorFromGroup, updateActionTargetStatus, updateCatalogTarget, updateGovernanceEngine, updateGovernanceService, updateIntegrationConnector, updateIntegrationGroup
-
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 eventsinterestingEventTypes
- types of events that should be passed to the listenerinterestingMetadataTypes
- types of elements that are the subject of the interesting event typesspecificInstance
- 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, PropertyServerExceptionCreate 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 actiondomainIdentifier
- governance domain associated with this action (0=ALL)displayName
- display name for this actiondescription
- description for this actionrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- future start time or null for "as soon as possible".governanceEngineName
- name of the governance engine to run the requestrequestType
- request type to identify the governance action service to runrequestParameters
- properties to pass to the governance action service- Returns:
- unique identifier of the governance action
- Throws:
InvalidParameterException
- null qualified nameUserNotAuthorizedException
- this governance action service is not authorized to create a governance actionPropertyServerException
- 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, PropertyServerExceptionCreate 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 actiondomainIdentifier
- governance domain associated with this action (0=ALL)displayName
- display name for this actiondescription
- description for this actionrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- future start time or null for "as soon as possible".governanceEngineName
- name of the governance engine to run the requestrequestType
- request type to identify the governance action service to runrequestParameters
- properties to pass to the governance action serviceprocessName
- name of the process that this action is a part of- Returns:
- unique identifier of the governance action
- Throws:
InvalidParameterException
- null qualified nameUserNotAuthorizedException
- this governance action service is not authorized to create a governance actionPropertyServerException
- there is a problem with the metadata store
-
initiateGovernanceActionType
String initiateGovernanceActionType(String governanceActionTypeQualifiedName, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action type as a template, initiate an engine action.- Parameters:
governanceActionTypeQualifiedName
- unique name of the governance action type to userequestSourceGUIDs
- request source elements for the resulting governance serviceactionTargets
- list of action target names to GUIDs for the resulting governance servicestartTime
- future start time or null for "as soon as possible".requestParameters
- request properties to be passed to the engine actionoriginatorServiceName
- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName
- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the engine action
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the typeUserNotAuthorizedException
- the caller is not authorized to create an engine actionPropertyServerException
- 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, PropertyServerExceptionUsing the named governance action process as a template, initiate a chain of governance actions.- Parameters:
processQualifiedName
- unique name of the governance action process to userequestParameters
- request parameters to pass to the governance actions called in the governance action processrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- future start time or null for "as soon as possible".- Returns:
- unique identifier of the governance action process instance
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the processUserNotAuthorizedException
- this governance action service is not authorized to create a governance action processPropertyServerException
- there is a problem with the metadata store
-