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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Activate 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.
    org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig
    Return the configuration used for the current active instance of the server.
    org.odpi.openmetadata.serveroperations.properties.ServerServicesStatus
    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 server
    org.odpi.openmetadata.frameworks.auditlog.ComponentDescription
    Return the component description that is used by this connector in the audit log.
    org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig
    Return 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.ServerStatus
    Retrieve the server status
    void
    setAuditLog(org.odpi.openmetadata.frameworks.auditlog.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
    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

    disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, 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

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension

    initializeEmbeddedConnectors
  • Constructor Details

    • OMAGServerConnectorBase

      public OMAGServerConnectorBase(String connectorName)
  • 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:
      setAuditLog in interface org.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:
      getConnectorComponentDescription in interface org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent
      Returns:
      id, name, description, wiki page URL.
    • setClientUserId

      public void setClientUserId(String clientUserId)
      Set up new calling user.
      Parameters:
      clientUserId - caller's userId
    • start

      public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      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 class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there is a problem within the connector.
    • getServerReport

      public OMAGServerProperties getServerReport() throws Exception
      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.OMAGConfigurationErrorException
      Return 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.PropertyServerException
      Activate 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.PropertyServerException
      Temporarily 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.PropertyServerException
      Permanently 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.PropertyServerException
      Retrieve the server status
      Returns:
      The server status
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.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.PropertyServerException
      Return 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.PropertyServerException
      Return 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.PropertyServerException
      Retrieve 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 invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.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 user
      cohortName - 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 problem
      org.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 user
      cohortName - name of cohort
      Returns:
      boolean flag to indicate success.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the supplied parameters caused a problem
      org.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 user
      cohortName - name of cohort
      Returns:
      boolean flag to indicate success.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the supplied parameters caused a problem
      org.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