Class RepositoryGovernanceServiceConnector

All Implemented Interfaces:
RepositoryGovernanceService, AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension
Direct Known Subclasses:

public abstract class RepositoryGovernanceServiceConnector extends ConnectorBase implements RepositoryGovernanceService, AuditLoggingComponent, VirtualConnectorExtension
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.
  • Field Details

    • repositoryGovernanceServiceName

      protected String repositoryGovernanceServiceName
    • repositoryGovernanceContext

      protected RepositoryGovernanceContext repositoryGovernanceContext
    • auditLog

      protected AuditLog auditLog
    • embeddedConnectors

      protected List<Connector> embeddedConnectors
  • Constructor Details

    • RepositoryGovernanceServiceConnector

      public RepositoryGovernanceServiceConnector()
  • Method Details

    • 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:
      setAuditLog in interface AuditLoggingComponent
      auditLog - audit log object
    • getConnectorComponentDescription

      public ComponentDescription getConnectorComponentDescription()
      Return the component description that is used by this connector in the audit log.
      Specified by:
      getConnectorComponentDescription in interface AuditLoggingComponent
      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:
      initializeEmbeddedConnectors in interface VirtualConnectorExtension
      embeddedConnectors - list of connectors
    • setRepositoryGovernanceContext

      public void setRepositoryGovernanceContext(RepositoryGovernanceContext repositoryGovernanceContext)
      Set up access to the open metadata ecosystem.
      repositoryGovernanceContext - interface to the enterprise repository services and the ability to register a listener to the enterprise OMRS topic.
    • setRepositoryGovernanceServiceName

      public void setRepositoryGovernanceServiceName(String archiveServiceName)
      Set up the archive service name. This is used in error messages.
      archiveServiceName - name of the archive service
    • getRepositoryGovernanceContext

      public RepositoryGovernanceContext 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.
      archive context containing the results discovered (so far) by the archive service.
    • start

      public void start() throws ConnectorCheckedException
      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.
      start in class ConnectorBase
      ConnectorCheckedException - there is a problem within the archive service.
    • handleUnexpectedException

      protected void handleUnexpectedException(String methodName, Exception error) throws ConnectorCheckedException
      Provide a common exception for unexpected errors.
      methodName - calling method
      error - caught exception
      ConnectorCheckedException - wrapped exception
    • validateContext

      protected void validateContext(RepositoryGovernanceContext governanceContext) throws ConnectorCheckedException
      Verify that the context has been set up for the subclass
      governanceContext - context from the subclass
      ConnectorCheckedException - error to say that the connector (governance action service) is not able to proceed because it has not been set up correctly.
    • disconnect

      public void disconnect() throws ConnectorCheckedException
      Free up any resources held since the connector is no longer needed.
      disconnect in class ConnectorBase
      ConnectorCheckedException - there is a problem within the connector.