Class RepositoryGovernanceServiceConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
- All Implemented Interfaces:
RepositoryGovernanceService,AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension
- Direct Known Subclasses:
DynamicArchiveService
public abstract class RepositoryGovernanceServiceConnector
extends ConnectorBase
implements RepositoryGovernanceService, AuditLoggingComponent
RepositoryGovernanceServiceConnector describes a specific type of connector that is responsible for managing the content
of a specific open metadata archive. Information about the available metadata is passed in the archive context.
The returned archive context also contains the status of this service.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuditLogprotected RepositoryGovernanceContextprotected StringFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the component description that is used by this connector in the audit log.Return the archive context for this archive service.protected voidhandleUnexpectedException(String methodName, Exception error) Provide a common exception for unexpected errors.voidsetAuditLog(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetRepositoryGovernanceContext(RepositoryGovernanceContext repositoryGovernanceContext) Set up access to the open metadata ecosystem.voidsetRepositoryGovernanceServiceName(String archiveServiceName) Set up the archive service name.voidstart()Indicates that the archive service is completely configured and can begin processing.protected voidvalidateContext(RepositoryGovernanceContext governanceContext) Verify that the context has been set up for the subclassMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestamp
-
Field Details
-
repositoryGovernanceServiceName
-
repositoryGovernanceContext
-
auditLog
-
-
Constructor Details
-
RepositoryGovernanceServiceConnector
public RepositoryGovernanceServiceConnector()
-
-
Method Details
-
setAuditLog
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
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.
-
setRepositoryGovernanceContext
Set up access to the open metadata ecosystem.- Parameters:
repositoryGovernanceContext- interface to the enterprise repository services and the ability to register a listener to the enterprise OMRS topic.
-
setRepositoryGovernanceServiceName
Set up the archive service name. This is used in error messages.- Parameters:
archiveServiceName- name of the archive service
-
getRepositoryGovernanceContext
Return the archive context for this archive service. This is typically called after the disconnect() method is called. If called before disconnect(), it may only contain partial results.- Returns:
- archive context containing the results discovered (so far) by the archive service.
-
start
Indicates that the archive service is completely configured and can begin processing. Any embedded connectors are started. This is the method where the function of the archive service is implemented in the subclass. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() in your version.- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the archive service.UserNotAuthorizedException- the connector was disconnected before/during start
-
handleUnexpectedException
protected void handleUnexpectedException(String methodName, Exception error) throws ConnectorCheckedException Provide a common exception for unexpected errors.- Parameters:
methodName- calling methoderror- caught exception- Throws:
ConnectorCheckedException- wrapped exception
-
validateContext
protected void validateContext(RepositoryGovernanceContext governanceContext) throws ConnectorCheckedException Verify that the context has been set up for 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.
-