Class OMRSRepositoryConnector
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
-
- All Implemented Interfaces:
AuditLoggingComponent
,OMRSMetadataCollectionManager
public abstract class OMRSRepositoryConnector extends ConnectorBase implements OMRSMetadataCollectionManager, AuditLoggingComponent
The OMRSRepositoryConnector defines the interface for an OMRS Repository Connector. It is an abstract class since not all of the methods for OMRSMetadataCollectionManager are implemented.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditLog
auditLog
protected int
maxPageSize
protected OMRSMetadataCollection
metadataCollection
protected String
metadataCollectionId
protected String
metadataCollectionName
protected String
organizationName
protected OMRSRepositoryHelper
repositoryHelper
protected String
repositoryName
protected OMRSRepositoryValidator
repositoryValidator
protected String
serverName
protected String
serverType
protected String
serverUserId
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description OMRSRepositoryConnector()
Default constructor nothing to do
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentDescription
getConnectorComponentDescription()
Return the component description that is used by this connector in the audit log.int
getMaxPageSize()
Return the maximum PageSizeOMRSMetadataCollection
getMetadataCollection()
Returns the metadata collection object that provides an OMRS abstraction of the metadata within a metadata repository.String
getMetadataCollectionId()
Return the unique Id for this metadata collection.String
getMetadataCollectionName()
Return the metadata collection name of this repository connector.String
getOrganizationName()
Return the name of the organization that runs/owns the server used to access the repository.OMRSRepositoryHelper
getRepositoryHelper()
Return the repository helper for this connector.String
getRepositoryName()
Return the name of the repository where the metadata collection resides.OMRSRepositoryValidator
getRepositoryValidator()
Return the repository validator for this connector.String
getServerName()
Return the name of the server where the metadata collection resides.String
getServerType()
Return the descriptive string describing the type of the server.String
getServerUserId()
Return the userId that the local server should use when processing events and there is no external user driving the operation.void
setAuditLog(AuditLog auditLog)
Receive an audit log object that can be used to record audit log messages.void
setMaxPageSize(int maxPageSize)
Set up the maximum PageSizevoid
setMetadataCollectionId(String metadataCollectionId)
Set up the unique Id for this metadata collection.void
setMetadataCollectionName(String metadataCollectionName)
Explicitly set up the metadata collection name.void
setOrganizationName(String organizationName)
Set up the name of the organization that runs/owns the server used to access the repository.void
setRepositoryHelper(OMRSRepositoryHelper repositoryHelper)
Set up a repository helper object for the repository connector to use.void
setRepositoryName(String repositoryName)
Set up the name of the repository where the metadata collection resides.void
setRepositoryValidator(OMRSRepositoryValidator repositoryValidator)
Set up a repository validator for the repository connector to use.void
setServerName(String serverName)
Set up the name of the server where the metadata collection resides.void
setServerType(String serverType)
Set up the descriptive string describing the type of the server.void
setServerUserId(String localServerUserId)
Set up the userId that the local server should use when processing events and there is no external user driving the operation.void
validateRepositoryIsActive(String methodName)
Throw a RepositoryErrorException if the connector is not active.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, start, toString
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
-
-
-
Field Detail
-
repositoryHelper
protected OMRSRepositoryHelper repositoryHelper
-
repositoryValidator
protected OMRSRepositoryValidator repositoryValidator
-
repositoryName
protected String repositoryName
-
serverName
protected String serverName
-
serverType
protected String serverType
-
organizationName
protected String organizationName
-
serverUserId
protected String serverUserId
-
maxPageSize
protected int maxPageSize
-
metadataCollectionId
protected String metadataCollectionId
-
metadataCollectionName
protected String metadataCollectionName
-
metadataCollection
protected OMRSMetadataCollection metadataCollection
-
auditLog
protected AuditLog auditLog
-
-
Method Detail
-
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 interfaceAuditLoggingComponent
- Parameters:
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 interfaceAuditLoggingComponent
- Returns:
- id, name, description, wiki page URL.
-
setRepositoryHelper
public void setRepositoryHelper(OMRSRepositoryHelper repositoryHelper)
Set up a repository helper object for the repository connector to use.- Specified by:
setRepositoryHelper
in interfaceOMRSMetadataCollectionManager
- Parameters:
repositoryHelper
- helper object for building and querying TypeDefs and metadata instances.
-
getRepositoryHelper
public OMRSRepositoryHelper getRepositoryHelper()
Return the repository helper for this connector.- Returns:
- helper object for building and querying TypeDefs and metadata instances.
-
setRepositoryValidator
public void setRepositoryValidator(OMRSRepositoryValidator repositoryValidator)
Set up a repository validator for the repository connector to use.- Specified by:
setRepositoryValidator
in interfaceOMRSMetadataCollectionManager
- Parameters:
repositoryValidator
- validator object to check the validity of TypeDefs and metadata instances.
-
getRepositoryValidator
public OMRSRepositoryValidator getRepositoryValidator()
Return the repository validator for this connector.- Returns:
- validator object to check the validity of TypeDefs and metadata instances.
-
getRepositoryName
public String getRepositoryName()
Return the name of the repository where the metadata collection resides.- Specified by:
getRepositoryName
in interfaceOMRSMetadataCollectionManager
- Returns:
- String name
-
setRepositoryName
public void setRepositoryName(String repositoryName)
Set up the name of the repository where the metadata collection resides.- Specified by:
setRepositoryName
in interfaceOMRSMetadataCollectionManager
- Parameters:
repositoryName
- String name
-
getServerName
public String getServerName()
Return the name of the server where the metadata collection resides.- Specified by:
getServerName
in interfaceOMRSMetadataCollectionManager
- Returns:
- String name
-
setServerName
public void setServerName(String serverName)
Set up the name of the server where the metadata collection resides.- Specified by:
setServerName
in interfaceOMRSMetadataCollectionManager
- Parameters:
serverName
- String name
-
getServerType
public String getServerType()
Return the descriptive string describing the type of the server. This might be the name of the product, or similar identifier.- Specified by:
getServerType
in interfaceOMRSMetadataCollectionManager
- Returns:
- String name
-
setServerType
public void setServerType(String serverType)
Set up the descriptive string describing the type of the server. This might be the name of the product, or similar identifier.- Specified by:
setServerType
in interfaceOMRSMetadataCollectionManager
- Parameters:
serverType
- String server type
-
getOrganizationName
public String getOrganizationName()
Return the name of the organization that runs/owns the server used to access the repository.- Specified by:
getOrganizationName
in interfaceOMRSMetadataCollectionManager
- Returns:
- String name
-
setOrganizationName
public void setOrganizationName(String organizationName)
Set up the name of the organization that runs/owns the server used to access the repository.- Specified by:
setOrganizationName
in interfaceOMRSMetadataCollectionManager
- Parameters:
organizationName
- String organization name
-
getServerUserId
public String getServerUserId()
Return the userId that the local server should use when processing events and there is no external user driving the operation.- Specified by:
getServerUserId
in interfaceOMRSMetadataCollectionManager
- Returns:
- user id
-
setServerUserId
public void setServerUserId(String localServerUserId)
Set up the userId that the local server should use when processing events and there is no external user driving the operation.- Specified by:
setServerUserId
in interfaceOMRSMetadataCollectionManager
- Parameters:
localServerUserId
- string user id
-
getMetadataCollectionId
public String getMetadataCollectionId()
Return the unique Id for this metadata collection.- Specified by:
getMetadataCollectionId
in interfaceOMRSMetadataCollectionManager
- Returns:
- String unique Id
-
setMetadataCollectionId
public void setMetadataCollectionId(String metadataCollectionId)
Set up the unique Id for this metadata collection.- Specified by:
setMetadataCollectionId
in interfaceOMRSMetadataCollectionManager
- Parameters:
metadataCollectionId
- String unique Id
-
getMetadataCollectionName
public String getMetadataCollectionName()
Return the metadata collection name of this repository connector. It defaults to the server name if not set up explicitly.- Returns:
- display name of the metadata collection.
-
setMetadataCollectionName
public void setMetadataCollectionName(String metadataCollectionName)
Explicitly set up the metadata collection name.- Parameters:
metadataCollectionName
- display name of the metadata collection.
-
getMaxPageSize
public int getMaxPageSize()
Return the maximum PageSize- Specified by:
getMaxPageSize
in interfaceOMRSMetadataCollectionManager
- Returns:
- maximum number of elements that can be retrieved on a request.
-
setMaxPageSize
public void setMaxPageSize(int maxPageSize)
Set up the maximum PageSize- Specified by:
setMaxPageSize
in interfaceOMRSMetadataCollectionManager
- Parameters:
maxPageSize
- maximum number of elements that can be retrieved on a request.
-
validateRepositoryIsActive
public void validateRepositoryIsActive(String methodName) throws RepositoryErrorException
Throw a RepositoryErrorException if the connector is not active.- Parameters:
methodName
- name of calling method- Throws:
RepositoryErrorException
- repository connector has not started or has been disconnected.
-
getMetadataCollection
public OMRSMetadataCollection getMetadataCollection() throws RepositoryErrorException
Returns the metadata collection object that provides an OMRS abstraction of the metadata within a metadata repository.- Specified by:
getMetadataCollection
in interfaceOMRSMetadataCollectionManager
- Returns:
- OMRSMetadataInstanceStore metadata information retrieved from the metadata repository.
- Throws:
RepositoryErrorException
- no metadata collection
-
-