Class GenericWatchdogGovernanceActionConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
org.odpi.openmetadata.frameworks.governanceaction.WatchdogGovernanceActionService
org.odpi.openmetadata.adapters.connectors.governanceactions.watchdog.GenericWatchdogGovernanceActionConnector
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,GovernanceActionService
- Direct Known Subclasses:
GenericElementWatchdogGovernanceActionConnector
,GenericFolderWatchdogGovernanceActionConnector
public abstract class GenericWatchdogGovernanceActionConnector
extends WatchdogGovernanceActionService
GenericWatchdogGovernanceActionConnector provides a base class for generic watchdog functions.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.governanceaction.WatchdogGovernanceActionService
governanceContext
Fields inherited from class org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
auditLog, governanceServiceName, propertyHelper
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
diffProperties
(ElementProperties oldProperties, ElementProperties newProperties) Return a comma separated list of properties that have changed.void
Disconnect is called either because this governance action service called governanceContext.recordCompletionStatus() or the administrator requested this governance action service stop running or the hosting server is shutting down.protected void
initiateProcess
(String processName, Map<String, String> requestParameters, List<NewActionTarget> actionTargets) Initiates the request for the new process to start if a process name has been configured.Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.WatchdogGovernanceActionService
getProperty, setGovernanceContext, start
Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceConnector
getArrayRequestParameter, getBooleanRequestParameter, getConnectorComponentDescription, getIntRequestParameter, getLongRequestParameter, getStringRequestParameter, handleUnexpectedException, setAuditLog, setGovernanceServiceName, validateContext
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
GenericWatchdogGovernanceActionConnector
public GenericWatchdogGovernanceActionConnector()
-
-
Method Details
-
diffProperties
Return a comma separated list of properties that have changed. This is saved in the request parameters and can be retrieved by the receiving governance service. The changed properties can be retrieved by the StringTokenizer class.- Parameters:
oldProperties
- original property valuesnewProperties
- new property values- Returns:
- comma separated list of property names where the value has changed
-
initiateProcess
protected void initiateProcess(String processName, Map<String, String> requestParameters, List<NewActionTarget> actionTargets) throws GovernanceServiceExceptionInitiates the request for the new process to start if a process name has been configured.- Parameters:
processName
- name of the process to startrequestParameters
- parameters to pass to the processactionTargets
- the elements that this process should work on- Throws:
GovernanceServiceException
- unable to start the process
-
disconnect
Disconnect is called either because this governance action service called governanceContext.recordCompletionStatus() or the administrator requested this governance action service stop running or the hosting server is shutting down. If disconnect completes before the governance action service records its completion status then the governance action service is restarted either at the administrator's request or the next time the server starts. If you do not want this governance action service restarted, be sure to record the completion status in disconnect(). The disconnect() method is a standard method from the Open Connector Framework (OCF). If you need to override this method be sure to call super.disconnect() in your version.- Overrides:
disconnect
in classWatchdogGovernanceActionService
- Throws:
ConnectorCheckedException
- there is a problem within the governance action service.
-