Class EnterpriseOMRSRepositoryConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension, OMRSMetadataCollectionManager, OMRSConnectorConsumer

public class EnterpriseOMRSRepositoryConnector extends OMRSRepositoryConnector implements OMRSConnectorConsumer
EnterpriseOMRSRepositoryConnector supports federating calls to multiple metadata repositories. As a result, its OMRSMetadataInstanceStore (EnterpriseOMRSMetadataCollection) returns metadata from all repositories in the connected open metadata repository cohort(s).

An instance of the EnterpriseOMRSRepositoryConnector is created by each Open Metadata Access Service (OMAS) using the OCF ConnectorBroker. They use its metadata collection to retrieve and send the metadata they need.

Each EnterpriseOMRSRepositoryConnector instance needs to maintain an up to date list of OMRS Connectors to all the repositories in the connected open metadata repository cohort(s). It does by registering as an OMRSConnectorConsumer with the OMRSConnectorManager to be notified when connectors to new open metadata repositories are available.

  • Method Details

    • setMetadataCollectionId

      public void setMetadataCollectionId(String metadataCollectionId)
      Set up the unique id for this metadata collection.
      Specified by:
      setMetadataCollectionId in interface OMRSMetadataCollectionManager
      Overrides:
      setMetadataCollectionId in class OMRSRepositoryConnector
      Parameters:
      metadataCollectionId - String unique Id
    • setLocalMetadataCollectionId

      public void setLocalMetadataCollectionId(String localMetadataCollectionId)
      Set the unique id of the metadata collection that is collocated with the Enterprise Metadata Collection
      Parameters:
      localMetadataCollectionId - String unique Id
    • setCallingServiceName

      public void setCallingServiceName(String callingServiceName)
      Set up the name of the access service using this connector.
      Parameters:
      callingServiceName - string name
    • start

      public void start() throws ConnectorCheckedException
      Indicates that the connector is completely configured and can begin processing.
      Overrides:
      start in class ConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem within the connector.
    • disconnect

      public void disconnect() throws ConnectorCheckedException
      Free up any resources held since the connector is no longer needed.
      Overrides:
      disconnect in class ConnectorBase
      Throws:
      ConnectorCheckedException - there is a problem disconnecting the connector.
    • requestRefreshOfEntity

      public void requestRefreshOfEntity(EntityDetail entity)
      Request the refresh of this instance.
      Parameters:
      entity - retrieved instance
    • requestRefreshOfRelationship

      public void requestRefreshOfRelationship(Relationship relationship)
      Request the refresh of this instance.
      Parameters:
      relationship - retrieved instance
    • setLocalConnector

      public void setLocalConnector(String metadataCollectionId, LocalOMRSRepositoryConnector localConnector)
      Save the connector to the local repository. This is passed from the OMRSConnectorManager.
      Specified by:
      setLocalConnector in interface OMRSConnectorConsumer
      Parameters:
      metadataCollectionId - Unique identifier for the metadata collection.
      localConnector - OMRSRepositoryConnector object for the local repository.
    • addRemoteConnector

      public void addRemoteConnector(String metadataCollectionId, OMRSRepositoryConnector remoteConnector)
      Pass the connector to one of the remote repositories in the metadata repository cohort.
      Specified by:
      addRemoteConnector in interface OMRSConnectorConsumer
      Parameters:
      metadataCollectionId - Unique identifier for the metadata collection.
      remoteConnector - OMRSRepositoryConnector object providing access to the remote repository.
    • removeRemoteConnector

      public void removeRemoteConnector(String metadataCollectionId)
      Pass the metadata collection id for a repository that has just left the metadata repository cohort.
      Specified by:
      removeRemoteConnector in interface OMRSConnectorConsumer
      Parameters:
      metadataCollectionId - identifier of the metadata collection that is no longer available.
    • disconnectAllConnectors

      public void disconnectAllConnectors()
      The OMRS is about to shut down. Call disconnect() on all registered remote connectors and stop calling them. There is no need to disconnect the local connector - that is handled by the EnterpriseConnectorManager
      Specified by:
      disconnectAllConnectors in interface OMRSConnectorConsumer