Class LocalOMRSRepositoryConnector

  • All Implemented Interfaces:
    AuditLoggingComponent, OMRSMetadataCollectionManager, org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository

    public class LocalOMRSRepositoryConnector
    extends OMRSRepositoryConnector
    implements org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
    LocalOMRSRepositoryConnector provides access the local metadata repository plus manages outbound repository events. It passes each request to both the real OMRS connector for the local metadata repository and an OMRSEventPublisher. The OMRSEventPublisher will use its configuration to decide if it needs to pass on the request to the rest of the metadata repository cohort.
    • Constructor Detail

      • LocalOMRSRepositoryConnector

        protected LocalOMRSRepositoryConnector​(OMRSRepositoryConnector realLocalConnector,
                                               LocalRepositoryMode localRepositoryMode,
                                               OMRSRepositoryEventMapperConnector realEventMapper,
                                               org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventManager outboundRepositoryEventManager,
                                               org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentManager repositoryContentManager,
                                               org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventExchangeRule saveExchangeRule)
        Constructor used by the LocalOMRSConnectorProvider. It provides the information necessary to run the local repository.
        Parameters:
        realLocalConnector - connector to the local repository
        localRepositoryMode - what is the mode of the local repository - affects how event mappers are treated
        realEventMapper - optional event mapper for local repository
        outboundRepositoryEventManager - event manager to call for outbound events.
        repositoryContentManager - repositoryContentManager for supporting OMRS in managing TypeDefs.
        saveExchangeRule - rule to determine what events to save to the local repository.
    • Method Detail

      • setSecurityVerifier

        public void setSecurityVerifier​(org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier securityVerifier)
        Set up a new security verifier (the cohort manager runs with a default verifier until this method is called). The security verifier provides authorization checks for access and maintenance changes to open metadata. Authorization checks are enabled through the OpenMetadataServerSecurityConnector.
        Parameters:
        securityVerifier - new security verifier
      • setRepositoryHelper

        public void setRepositoryHelper​(org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentHelper repositoryHelper)
        Set up a repository helper object for the repository connector to use.
        Parameters:
        repositoryHelper - helper object for building TypeDefs and metadata instances.
      • setRepositoryValidator

        public void setRepositoryValidator​(org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentValidator repositoryValidator)
        Set up a repository validator for the repository connector to use.
        Parameters:
        repositoryValidator - validator object to check the validity of TypeDefs and metadata instances.
      • setAuditLog

        public void setAuditLog​(OMRSAuditLog 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.
        Parameters:
        auditLog - audit log object
      • setMetadataCollectionName

        public void setMetadataCollectionName​(java.lang.String metadataCollectionName)
        Explicitly set up the metadata collection name.
        Overrides:
        setMetadataCollectionName in class OMRSRepositoryConnector
        Parameters:
        metadataCollectionName - display name of the metadata collection.
      • getMetadataCollection

        public OMRSMetadataCollection getMetadataCollection()
                                                     throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
        Returns the metadata collection object that provides an OMRS abstraction of the metadata within a metadata repository.
        Specified by:
        getMetadataCollection in interface OMRSMetadataCollectionManager
        Overrides:
        getMetadataCollection in class OMRSRepositoryConnector
        Returns:
        OMRSMetadataInstanceStore metadata information retrieved from the metadata repository.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - no metadata collection
      • getLocalRepositoryRemoteConnection

        public Connection getLocalRepositoryRemoteConnection()
        Returns the Connection to the local repository that can be used by remote servers to create an OMRS repository connector to call this server in order to access the local repository.
        Specified by:
        getLocalRepositoryRemoteConnection in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        Connection object
      • getOutboundRepositoryEventManager

        public org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventManager getOutboundRepositoryEventManager()
        Return the event manager that the local repository uses to distribute events from the local repository.
        Specified by:
        getOutboundRepositoryEventManager in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        outbound repository event manager
      • getIncomingTypeDefEventProcessor

        public OMRSTypeDefEventProcessor getIncomingTypeDefEventProcessor()
        Return the TypeDef event processor that should be passed all incoming TypeDef events received from the cohorts that this server is a member of.
        Specified by:
        getIncomingTypeDefEventProcessor in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        OMRSTypeDefEventProcessor for the local repository.
      • getIncomingInstanceEventProcessor

        public LocalOMRSInstanceEventProcessor getIncomingInstanceEventProcessor()
        Return the instance event processor that should be passed all incoming instance events received from the cohorts that this server is a member of.
        Specified by:
        getIncomingInstanceEventProcessor in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        OMRSInstanceEventProcessor for the local repository.
      • getIncomingInstanceRetrievalEventProcessor

        public OMRSInstanceRetrievalEventProcessor getIncomingInstanceRetrievalEventProcessor()
        Return the instance event processor that should be passed all incoming instance events received from the cohorts that this server is a member of.
        Returns:
        OMRSInstanceEventProcessor for the local repository.
      • getLocalServerName

        public java.lang.String getLocalServerName()
        Return the local server name used for outbound events.
        Specified by:
        getLocalServerName in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        String name
      • getLocalServerType

        public java.lang.String getLocalServerType()
        Return the local server type used for outbound events.
        Specified by:
        getLocalServerType in interface org.odpi.openmetadata.repositoryservices.localrepository.OMRSLocalRepository
        Returns:
        String name