Class GovernanceActionService
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionService
-
- All Implemented Interfaces:
AuditLoggingComponent,VirtualConnectorExtension
- Direct Known Subclasses:
ProvisioningGovernanceActionService,RemediationGovernanceActionService,TriageGovernanceActionService,VerificationGovernanceActionService,WatchdogGovernanceActionService
public abstract class GovernanceActionService extends ConnectorBase implements AuditLoggingComponent, VirtualConnectorExtension
GovernanceActionService describes the base class for a specific type of connector that is responsible for preforming specific governance actions on demand. There are five types of governance action service:- WatchdogGovernanceActionService - monitors for changes to the metadata elements and initiates other governance actions depending on the nature of the change.
- VerificationGovernanceActionService - tests values in the metadata elements to detect errors or to classify the status of the metadata elements.
- TriageGovernanceActionService - manages the choices on how to resolve a situation, often involving a human decision maker.
- RemediationGovernanceActionService - maintains the metadata elements.
- ProvisioningGovernanceActionService - provisions resources in the digital landscape and maintains lineage.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditLogauditLogprotected List<Connector>embeddedConnectorsprotected StringgovernanceServiceName-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description GovernanceActionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentDescriptiongetConnectorComponentDescription()Return the component description that is used by this connector in the audit log.protected voidhandleUnexpectedException(String methodName, Throwable error)Provide a common exception for unexpected errors.voidinitializeEmbeddedConnectors(List<Connector> embeddedConnectors)Set up the list of connectors that this virtual connector will use to support its interface.voidsetAuditLog(AuditLog auditLog)Receive an audit log object that can be used to record audit log messages.voidsetGovernanceServiceName(String governanceServiceName)Set up the governance action service name.voidvalidateContext(GovernanceContext governanceContext)Verify that the context has been set up in the subclass-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, start, toString
-
-
-
-
Method Detail
-
setAuditLog
public void setAuditLog(AuditLog auditLog)
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLogin interfaceAuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
public ComponentDescription getConnectorComponentDescription()
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceAuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
initializeEmbeddedConnectors
public void initializeEmbeddedConnectors(List<Connector> embeddedConnectors)
Set up the list of connectors that this virtual connector will use to support its interface. The connectors are initialized waiting to start. When start() is called on the virtual connector, it needs to pass start() to each of the embedded connectors. Similarly for disconnect().- Specified by:
initializeEmbeddedConnectorsin interfaceVirtualConnectorExtension- Parameters:
embeddedConnectors- list of connectors
-
setGovernanceServiceName
public void setGovernanceServiceName(String governanceServiceName)
Set up the governance action service name. This is used in error messages.- Parameters:
governanceServiceName- name of the service
-
handleUnexpectedException
protected void handleUnexpectedException(String methodName, Throwable error) throws ConnectorCheckedException
Provide a common exception for unexpected errors.- Parameters:
methodName- calling methoderror- caught exception- Throws:
GovernanceServiceException- wrapped exceptionConnectorCheckedException
-
validateContext
public void validateContext(GovernanceContext governanceContext) throws ConnectorCheckedException
Verify that the context has been set up in the subclass- Parameters:
governanceContext- context from the subclass- Throws:
ConnectorCheckedException- error to say that the connector (governance action service) is not able to proceed because it has not been set up correctly.
-
-