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:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension,org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
- Direct Known Subclasses:
EngineHostConnector,IntegrationDaemonConnector,MetadataAccessServerConnector,OMAGServerConnector,ViewServerConnector
public abstract class OMAGServerConnectorBase
extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase
implements org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent, org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.booleanconnectToCohort(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.booleandisconnectFromCohort(String userId, String cohortName) Disconnect communications from a specific cohort.org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfigReturn the configuration used for the current active instance of the server.org.odpi.openmetadata.serveroperations.properties.ServerServicesStatusReturn 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 serverorg.odpi.openmetadata.frameworks.auditlog.ComponentDescriptionReturn the component description that is used by this connector in the audit log.org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfigReturn the complete set of configuration properties in use by the server.Return the latest status information about a particular service.org.odpi.openmetadata.serveroperations.properties.ServerStatusRetrieve the server statusvoidsetAuditLog(org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetClientUserId(String clientUserId) Set up new calling user.voidPermanently deactivate any open metadata and governance services and unregister from any cohorts.voidTemporarily deactivate any open metadata and governance services.voidstart()Indicates that the connector is completely configured and can begin processing.booleanunregisterFromCohort(String userId, String cohortName) Unregister from a specific cohort and disconnect from cohort communications.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestampMethods inherited from interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
initializeEmbeddedConnectors
-
Constructor Details
-
OMAGServerConnectorBase
-
-
Method Details
-
setAuditLog
public void setAuditLog(org.odpi.openmetadata.frameworks.auditlog.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:
setAuditLogin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
public org.odpi.openmetadata.frameworks.auditlog.ComponentDescription getConnectorComponentDescription()Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceorg.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setClientUserId
Set up new calling user.- Parameters:
clientUserId- caller's userId
-
start
public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedExceptionIndicates that the connector is completely configured and can begin processing. This call can be used to register with non-blocking services.- Overrides:
startin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.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 org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig getOMAGServerConfig() throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorExceptionReturn the complete set of configuration properties in use by the server.- Returns:
- OMAGServerConfig properties
- Throws:
org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException- invalid serverName parameter.org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException- something went wrong with the REST call stack.
-
activateServer
public String activateServer() throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Returns:
- success message
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- invalid parameter.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- unusual state in the server.
-
shutdownServer
public void shutdownServer() throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionTemporarily deactivate any open metadata and governance services.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- invalid parameter.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- unusual state in the platform.
-
shutdownAndUnregisterServer
public void shutdownAndUnregisterServer() throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionPermanently deactivate any open metadata and governance services and unregister from any cohorts.- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- invalid parameter.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- unusual state in the platform.
-
getServerStatus
public org.odpi.openmetadata.serveroperations.properties.ServerStatus getServerStatus() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionRetrieve the server status- Returns:
- The server status
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
getActiveConfiguration
public org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig getActiveConfiguration() throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- invalid parameter.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- unusual state in the platform.
-
getActiveServerStatus
public org.odpi.openmetadata.serveroperations.properties.ServerServicesStatus getActiveServerStatus() throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionReturn the status of a running server (use platform services to find out if the server is running).- Returns:
- status of the server
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the supplied userId is not authorized to issue this command.org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- invalid parameter.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- unusual state in the platform.
-
getActiveServices
public List<String> getActiveServices() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionRetrieve a list of the active services on a server- Returns:
- List of service names
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
connectToCohort
public boolean connectToCohort(String userId, String cohortName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the supplied parameters caused a problemorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem communicating with the remote server.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to perform the operation requested
-
disconnectFromCohort
public boolean disconnectFromCohort(String userId, String cohortName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Disconnect communications from a specific cohort.- Parameters:
userId- calling usercohortName- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the supplied parameters caused a problemorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem communicating with the remote server.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to perform the operation requested
-
unregisterFromCohort
public boolean unregisterFromCohort(String userId, String cohortName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.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:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the supplied parameters caused a problemorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem communicating with the remote server.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the user is not authorized to perform the operation requested
-