Class OMAGServerConnectorBase
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.egeriainfrastructure.servers.OMAGServerConnectorBase
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
- Direct Known Subclasses:
EngineHostConnector
,IntegrationDaemonConnector
,MetadataAccessServerConnector
,OMAGServerConnector
,ViewServerConnector
public abstract class OMAGServerConnectorBase
extends ConnectorBase
implements AuditLoggingComponent, VirtualConnectorExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.boolean
connectToCohort
(String userId, String cohortName) A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository.boolean
disconnectFromCohort
(String userId, String cohortName) Disconnect communications from a specific cohort.Return the configuration used for the current active instance of the server.Return the status of a running server (use platform services to find out if the server is running).Retrieve a list of the active services on a serverReturn the component description that is used by this connector in the audit log.Return the complete set of configuration properties in use by the server.Return the latest status information about a particular service.Retrieve the server statusvoid
setAuditLog
(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.void
setClientUserId
(String clientUserId) Set up new calling user.void
Permanently deactivate any open metadata and governance services and unregister from any cohorts.void
Temporarily deactivate any open metadata and governance services.void
start()
Indicates that the connector is completely configured and can begin processing.boolean
unregisterFromCohort
(String userId, String cohortName) Unregister from a specific cohort and disconnect from cohort communications.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
initializeEmbeddedConnectors
-
Field Details
-
extractor
-
-
Constructor Details
-
OMAGServerConnectorBase
-
-
Method Details
-
setAuditLog
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
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.
-
setClientUserId
Set up new calling user.- Parameters:
clientUserId
- caller's userId
-
start
Indicates that the connector is completely configured and can begin processing. This call can be used to register with non-blocking services.- Overrides:
start
in classConnectorBase
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
getServerReport
Return the latest status information about a particular service.- Returns:
- server report
- Throws:
Exception
- a variety of exceptions from the different clients
-
getOMAGServerConfig
public OMAGServerConfig getOMAGServerConfig() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorExceptionReturn the complete set of configuration properties in use by the server.- Returns:
- OMAGServerConfig properties
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid serverName parameter.OMAGConfigurationErrorException
- something went wrong with the REST call stack.
-
activateServer
public String activateServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Returns:
- success message
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the server.
-
shutdownServer
public void shutdownServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionTemporarily deactivate any open metadata and governance services.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownAndUnregisterServer
public void shutdownAndUnregisterServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionPermanently deactivate any open metadata and governance services and unregister from any cohorts.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getServerStatus
public ServerStatus getServerStatus() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve the server status- Returns:
- The server status
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getActiveConfiguration
public OMAGServerConfig getActiveConfiguration() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionReturn the configuration used for the current active instance of the server. Null is returned if the server instance is not running.- Returns:
- configuration properties used to initialize the server or null if not running
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getActiveServerStatus
public ServerServicesStatus getActiveServerStatus() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionReturn the status of a running server (use platform services to find out if the server is running).- Returns:
- status of the server
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getActiveServices
public List<String> getActiveServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the active services on a server- Returns:
- List of service names
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
connectToCohort
public boolean connectToCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository. It only needs to do this once and uses a timestamp to record that the registration event has been sent. If the server has already registered in the past, it sends a reregistration request.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean to indicate that the request has been issued. If false it is likely that the cohort name is not known
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
disconnectFromCohort
public boolean disconnectFromCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Disconnect communications from a specific cohort.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
unregisterFromCohort
public boolean unregisterFromCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Unregister from a specific cohort and disconnect from cohort communications.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-