Class ConnectorConfigurationFactory
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.ConnectorConfigurationFactory
ConnectorConfigurationFactory sets up default configuration for the OMRS components. It is used by the OMAG and UI server
while it manages the changes made to the server configuration by the server administrator. The aim is to
build up the RepositoryServicesConfig object that is used to initialize the OMRSOperationalServices.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetConsoleAuditLogConnection
(String qualifier, List<String> supportedSeverities) Return the connection for the console audit log destination.Return the connection for the default audit log.getDefaultCohortOMRSTopicConnection
(String topicName, Map<String, Object> configurationProperties, String eventSourceName, String eventBusConnectorProvider, String topicURLRoot, String consumerGroupId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.getDefaultCohortRegistryConnection
(String localServerName, String cohortName) Return the connection to the default registry store called localServerName.cohortName.registrystore.getDefaultEnterpriseOMRSTopicConnection
(String localServerName, String serverId) Return the default connection for the enterprise OMRS topic.getDefaultEventBusConnection
(String connectorProviderClassName, String topicURLRoot, String topicName, String serverId, String eventDirection, Map<String, Object> configurationProperties) Return the event bus connection substituting default values where they are missing from the event bus configuration.Return the default local repository event mapper.getDefaultInstancesCohortOMRSTopicConnection
(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the single OMRS topic for the named cohort.Return the default local repository's local connection.getDefaultLocalRepositoryRemoteConnection
(String localServerName, String localServerURL) Return the Connection for this server's OMRS Repository REST API.getDefaultRegistrationCohortOMRSTopicConnection
(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.getDefaultRemoteEnterpriseOMRSTopicConnection
(String localServerName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the default connection for the enterprise OMRS topic.getDefaultSingleCohortOMRSTopicConnection
(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the single OMRS topic for the named cohort.getDefaultTypesCohortOMRSTopicConnection
(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.getEventTopicAuditLogConnection
(String localServerName, List<String> supportedSeverities, String eventBusConnectorProviderClassName, String topicURLRoot, String suppliedTopicName, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the event topic audit log.getFileBasedAuditLogConnection
(String localServerName, String directoryName, List<String> supportedSeverities) Return the connection for the file-based audit log.Return the in-memory local repository connection.getLocalGraphRepositoryLocalConnection
(Map<String, Object> storageProperties) Return the local graph repository's connection.getOpenMetadataArchiveFileConnection
(String fileName) Return the connection for an open metadata archive file.getPostgreSQLBasedAuditLogConnection
(Map<String, Object> storageProperties) Return the connection for the JDBC-based audit log.getPostgresRepositoryLocalConnection
(String localServerName, Map<String, Object> storageProperties) Return the postgres repository's connection.Return the read only local repository connection.getRepositoryConnection
(String connectorProviderClassName, String url, Map<String, Object> configurationProperties) Returns the connection for an arbitrary repository proxy.getRepositoryEventMapperConnection
(String connectorProviderClassName, Map<String, Object> configurationProperties, String eventSource) Return a connection for a repository event mapper.getServerConfigConnection
(String serverName) Returns the connection for the open metadata server configuration file.Returns the connection for the open metadata server configuration retrieve all.getSLF4JAuditLogConnection
(String qualifier, List<String> supportedSeverities) Return the connection for the file-based audit log.Return the local XTDB repository's connection for an in memory repository.getXTDBKVLocalRepositoryLocalConnection
(String serverName) Return the local XTDB repository's connection.getXTDBLocalRepositoryLocalConnection
(Map<String, Object> storageProperties) Return the local XTDB repository's connection.
-
Constructor Details
-
ConnectorConfigurationFactory
public ConnectorConfigurationFactory()Default constructor
-
-
Method Details
-
getServerConfigConnection
Returns the connection for the open metadata server configuration file.- Parameters:
serverName
- name of the server- Returns:
- Connection object
-
getServerConfigConnectionForRetrieveAll
Returns the connection for the open metadata server configuration retrieve all.- Returns:
- Connection object
-
getDefaultAuditLogConnection
Return the connection for the default audit log. By default, the Audit Log written to stdout.- Returns:
- OCF Connection used to create the default audit logger
-
getConsoleAuditLogConnection
Return the connection for the console audit log destination. This audit log destination writes to stdout.- Parameters:
qualifier
- unique qualifier for the connectionsupportedSeverities
- list of severities that should be logged to this destination (empty list means all)- Returns:
- OCF Connection used to create the stdout console audit logger
-
getFileBasedAuditLogConnection
public Connection getFileBasedAuditLogConnection(String localServerName, String directoryName, List<String> supportedSeverities) Return the connection for the file-based audit log. By default, the File-based Audit log is stored in a directory called localServerName.ffdc.- Parameters:
localServerName
- name of the local serverdirectoryName
- name of directorysupportedSeverities
- list of severities that should be logged to this destination (empty list means all)- Returns:
- OCF Connection used to create the file based audit logger
-
getPostgreSQLBasedAuditLogConnection
Return the connection for the JDBC-based audit log. By default, the File-based Audit log is stored in a directory called localServerName.ffdc.- Parameters:
storageProperties
- properties used to configure access to the database- Returns:
- OCF Connection used to create the file based audit logger
-
getSLF4JAuditLogConnection
Return the connection for the file-based audit log. By default, the File-based Audit log is stored in a directory called localServerName.ffdc.- Parameters:
qualifier
- unique qualifier for the connectionsupportedSeverities
- list of severities that should be logged to this destination (empty list means all)- Returns:
- OCF Connection used to create the file based audit logger
-
getEventTopicAuditLogConnection
public Connection getEventTopicAuditLogConnection(String localServerName, List<String> supportedSeverities, String eventBusConnectorProviderClassName, String topicURLRoot, String suppliedTopicName, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the event topic audit log. By default, the topic name is called openmetadata.repositoryservices.{localServerName}.ffdc.- Parameters:
localServerName
- name of the local serversupportedSeverities
- list of severities that should be logged to this destination (empty list means all)eventBusConnectorProviderClassName
- name of connector provider class that controls the type of connector used.topicURLRoot
- root URL of the topic - this is prepended to the topic namesuppliedTopicName
- topicName from the callerserverId
- identifier of the server - used to pick up the right offset for the inbound messages.eventBusConfigurationProperties
- - additional properties for the event bus connection- Returns:
- OCF Connection used to create the event topic audit logger
-
getOpenMetadataArchiveFileConnection
Return the connection for an open metadata archive file.- Parameters:
fileName
- name of the archive file- Returns:
- OCF Connection used to create the file-based open metadata archive
-
getDefaultCohortRegistryConnection
Return the connection to the default registry store called localServerName.cohortName.registrystore.- Parameters:
localServerName
- name of the local servercohortName
- name of the cohort- Returns:
- Connection object
-
getDefaultLocalRepositoryLocalConnection
Return the default local repository's local connection. This is set to null which means use the remote connection.- Returns:
- null Connection object
-
getDefaultLocalRepositoryRemoteConnection
public Connection getDefaultLocalRepositoryRemoteConnection(String localServerName, String localServerURL) Return the Connection for this server's OMRS Repository REST API. If the localServerURL is something like https://localhost:9443/west-domain then the REST API URL would be https://localhost:9443/west-domain/servers/{localServerName}/open-metadata/repository-services/...- Parameters:
localServerName
- name of the local serverlocalServerURL
- root of the local server's URL- Returns:
- Connection object
-
getLocalGraphRepositoryLocalConnection
Return the local graph repository's connection. This is using the GraphOMRSRepositoryConnector. Note there is no endpoint defined. This needs to be added when the graph repository connector is implemented.- Parameters:
storageProperties
- properties used to configure Egeria Graph DB- Returns:
- Connection object
-
getPostgresRepositoryLocalConnection
public Connection getPostgresRepositoryLocalConnection(String localServerName, Map<String, Object> storageProperties) Return the postgres repository's connection. This is using the PostgresOMRSRepositoryConnector.- Parameters:
localServerName
- name of local serverstorageProperties
- properties used to configure Egeria Graph DB- Returns:
- Connection object
-
getXTDBInMemLocalRepositoryLocalConnection
Return the local XTDB repository's connection for an in memory repository. This is using the XTDBOMRSRepositoryConnector. Note there is no endpoint defined.- Returns:
- Connection object
-
getXTDBKVLocalRepositoryLocalConnection
Return the local XTDB repository's connection. This is using the XTDBOMRSRepositoryConnector. Note there is no endpoint defined.
"configurationProperties": { "xtdbConfig": { "xtdb.lucene/lucene-store": { "db-dir": "data/servers/" + serverName + "/xtdb/lucene" }, "xtdb/index-store": { "kv-store": { "xtdb/module": "xtdb.rocksdb/->kv-store", "db-dir" : "data/servers/" + serverName + "/xtdb/rdb-index" } }, "xtdb/document-store": { "kv-store": { "xtdb/module" : "xtdb.rocksdb/->kv-store", "db-dir" : "data/servers/" + serverName + "/xtdb/rdb-docs" } }, "xtdb/tx-log": { "kv-store": { "xtdb/module" : "xtdb.rocksdb/->kv-store", "db-dir" : "data/servers/" + serverName + "/xtdb/rdb-tx" } } } }- Parameters:
serverName
- associated server name- Returns:
- Connection object
-
getXTDBLocalRepositoryLocalConnection
Return the local XTDB repository's connection. This is using the XTDBOMRSRepositoryConnector. Note there is no endpoint defined.- Parameters:
storageProperties
- properties used to configure Egeria XTDB DB- Returns:
- Connection object
-
getInMemoryLocalRepositoryLocalConnection
Return the in-memory local repository connection. This is using the InMemoryOMRSRepositoryConnector.- Returns:
- Connection object
-
getReadOnlyLocalRepositoryLocalConnection
Return the read only local repository connection. This is using the ReadOnlyOMRSRepositoryConnector.- Returns:
- Connection object
-
getRepositoryConnection
public Connection getRepositoryConnection(String connectorProviderClassName, String url, Map<String, Object> configurationProperties) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetExceptionReturns the connection for an arbitrary repository proxy.- Parameters:
connectorProviderClassName
- class name of the connector providerurl
- location of the repository proxyconfigurationProperties
- name value pairs for the connection- Returns:
- Connection object
- Throws:
ClassNotFoundException
- when the provided class cannot be foundInstantiationException
- when the provided class cannot be instantiatedIllegalAccessException
- when there is insufficient access to instantiate the provided classNoSuchMethodException
- the default constructor of the connector provider is not implementedInvocationTargetException
- the default constructor of the connector provider can not be called
-
getDefaultEventMapperConnection
Return the default local repository event mapper. This is null since the use of, or need for, the event mapper is determined by the type of local repository.- Returns:
- null Connection object
-
getDefaultEventBusConnection
public Connection getDefaultEventBusConnection(String connectorProviderClassName, String topicURLRoot, String topicName, String serverId, String eventDirection, Map<String, Object> configurationProperties) Return the event bus connection substituting default values where they are missing from the event bus configuration.- Parameters:
connectorProviderClassName
- name of connector provider class that controls the type of connector used.topicURLRoot
- root URL of the topic - this is prepended to the topic nametopicName
- name of the topic - if null it means that the connection should be nullserverId
- identifier of the server - used to pick up the right offset for the inbound messages.eventDirection
- should the event bus be restricted in the direction that events can flow?configurationProperties
- additional configuration properties for the connection- Returns:
- Connection object
-
getDefaultEnterpriseOMRSTopicConnection
Return the default connection for the enterprise OMRS topic. This uses an in-memory event bus connector- Parameters:
localServerName
- name of local serverserverId
- identifier of the server - used to pick up the right offset for the inbound messages.- Returns:
- Connection object
-
getDefaultRemoteEnterpriseOMRSTopicConnection
public Connection getDefaultRemoteEnterpriseOMRSTopicConnection(String localServerName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the default connection for the enterprise OMRS topic. This uses an in-memory event bus connector- Parameters:
localServerName
- name of local serverconfigurationProperties
- name value property pairs for the topic connectioneventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLserverId
- identifier of the server - used to pick up the right offset for the inbound messages.eventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getDefaultSingleCohortOMRSTopicConnection
public Connection getDefaultSingleCohortOMRSTopicConnection(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the single OMRS topic for the named cohort.- Parameters:
cohortName
- name of the cohortconfigurationProperties
- name value property pairs for the topic connectioneventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLserverId
- identifier of the server - used to pick up the right offset for the inbound messages.eventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getDefaultRegistrationCohortOMRSTopicConnection
public Connection getDefaultRegistrationCohortOMRSTopicConnection(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.- Parameters:
cohortName
- name of the cohortconfigurationProperties
- name value property pairs for the topic connectioneventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLeventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getDefaultTypesCohortOMRSTopicConnection
public Connection getDefaultTypesCohortOMRSTopicConnection(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.- Parameters:
cohortName
- name of the cohortconfigurationProperties
- name value property pairs for the topic connectioneventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLeventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getDefaultInstancesCohortOMRSTopicConnection
public Connection getDefaultInstancesCohortOMRSTopicConnection(String cohortName, Map<String, Object> configurationProperties, String eventBusConnectorProvider, String topicURLRoot, String serverId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the single OMRS topic for the named cohort.- Parameters:
cohortName
- name of the cohortconfigurationProperties
- name value property pairs for the topic connectioneventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLserverId
- identifier of the server - used to pick up the right offset for the inbound messages.eventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getDefaultCohortOMRSTopicConnection
public Connection getDefaultCohortOMRSTopicConnection(String topicName, Map<String, Object> configurationProperties, String eventSourceName, String eventBusConnectorProvider, String topicURLRoot, String consumerGroupId, Map<String, Object> eventBusConfigurationProperties) Return the connection for the registration OMRS topic for the named cohort.- Parameters:
topicName
- name of the topic in the cohortconfigurationProperties
- name value property pairs for the topic connectioneventSourceName
- name of the event sourceeventBusConnectorProvider
- class name of the event bus connector's providertopicURLRoot
- root name for the topic URLconsumerGroupId
- identifier of the consumer group - used to pick up the right offset for the inbound messages.eventBusConfigurationProperties
- name value property pairs for the event bus connection- Returns:
- Connection object
-
getRepositoryEventMapperConnection
public Connection getRepositoryEventMapperConnection(String connectorProviderClassName, Map<String, Object> configurationProperties, String eventSource) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetExceptionReturn a connection for a repository event mapper. Notice that this event mapper is not the open metadata virtual connector because this event mapper is interfacing with external technology.- Parameters:
connectorProviderClassName
- java class name of the connector provider for the event mapperconfigurationProperties
- additional properties for event mappereventSource
- name of the event source used by the event mapper- Returns:
- Connection object
- Throws:
ClassNotFoundException
- when the provided class cannot be foundInstantiationException
- when the provided class cannot be instantiatedIllegalAccessException
- when there is insufficient access to instantiate the provided classNoSuchMethodException
- the default constructor of the connector provider is not implementedInvocationTargetException
- the default constructor of the connector provider can not be called
-