Class AccessServiceAdmin

java.lang.Object
org.odpi.openmetadata.adminservices.registration.AccessServiceAdmin

public abstract class AccessServiceAdmin extends Object
AccessServiceAdmin is the interface that an access service implements to receive its configuration. The java class that implements this interface is created with a default constructor and then the initialize method is called. It is configured in the AccessServiceDescription enumeration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<String>
    extractDefaultZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Extract the default zones property from the access services option.
    protected int
    extractKarmaPointIncrement(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Extract the karma point plateau property from the access services option.
    protected int
    extractKarmaPointPlateau(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Extract the karma point plateau property from the access services option.
    protected List<String>
    extractPublishZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Extract the publish zones property from the access services option.
    protected List<String>
    extractSupportedZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Extract the supported zones property from the access services option.
    Return the cached service name.
    protected org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
    getInTopicEventBusConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection inTopicConnection, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog parentAuditLog)
    Create the connector for this access services' In Topic.
    protected org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection
    getOutTopicConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection outTopicEventBusConnection, String accessServiceFullName, String accessServiceConnectorProviderClassName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Create the connector for this access services' Out Topic.
    protected org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
    getOutTopicEventBusConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection outTopicEventBusConnection, String accessServiceName, org.odpi.openmetadata.frameworks.auditlog.AuditLog parentAuditLog)
    Create the event bus connector for this access services' Out Topic.
    <T> T
    getTopicConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection topicConnection, Class<T> topicConnectorClass, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, String accessServiceFullName, String methodName)
    Create an instance of an open metadata topic connector using the supplied connection.
    protected String
    getTopicName(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
    Return the name of the topic extracted from the endpoint of the topic's Connection.
    void
    initialize(org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig accessServiceConfigurationProperties, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector enterpriseOMRSTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, String serverUserName)
    Initialize the access service.
    void
    initialize(org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig accessServiceConfigurationProperties, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector enterpriseOMRSTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog auditLog, String serverUserName)
    Deprecated.
    protected void
    registerWithEnterpriseTopic(String accessServiceFullName, String serverName, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector omrsTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListener omrsTopicListener, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Register a listener with the enterprise topic connector.
    void
    setFullServiceName(String fullServiceName)
    Set up the cached service name.
    abstract void
    Shutdown the access service.
    protected void
    throwUnexpectedInitializationException(String actionDescription, String fullAccessServiceName, Throwable error)
    Log that an unexpected exception was received during start up.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • supportedZonesPropertyName

      protected String supportedZonesPropertyName
    • defaultZonesPropertyName

      protected String defaultZonesPropertyName
    • publishZonesPropertyName

      protected String publishZonesPropertyName
    • karmaPointPlateauPropertyName

      protected String karmaPointPlateauPropertyName
    • karmaPointIncrementPropertyName

      protected String karmaPointIncrementPropertyName
  • Constructor Details

    • AccessServiceAdmin

      public AccessServiceAdmin()
  • Method Details

    • initialize

      @Deprecated public void initialize(org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig accessServiceConfigurationProperties, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector enterpriseOMRSTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog auditLog, String serverUserName) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Deprecated.
      Initialize the access service.
      Parameters:
      accessServiceConfigurationProperties - specific configuration properties for this access service.
      enterpriseOMRSTopicConnector - connector for receiving OMRS Events from the cohorts
      enterpriseOMRSRepositoryConnector - connector for querying the cohort repositories
      auditLog - audit log component for logging messages.
      serverUserName - user id to use on OMRS calls where there is no end user.
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - invalid parameters in the configuration properties.
    • initialize

      public void initialize(org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig accessServiceConfigurationProperties, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector enterpriseOMRSTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, String serverUserName) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Initialize the access service.
      Parameters:
      accessServiceConfigurationProperties - specific configuration properties for this access service.
      enterpriseOMRSTopicConnector - connector for receiving OMRS Events from the cohorts
      enterpriseOMRSRepositoryConnector - connector for querying the cohort repositories
      auditLog - audit log component for logging messages.
      serverUserName - user id to use on OMRS calls where there is no end user.
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - invalid parameters in the configuration properties.
    • getFullServiceName

      public String getFullServiceName()
      Return the cached service name.
      Returns:
      string name
    • setFullServiceName

      public void setFullServiceName(String fullServiceName)
      Set up the cached service name.
      Parameters:
      fullServiceName - string name
    • shutdown

      public abstract void shutdown()
      Shutdown the access service.
    • extractSupportedZones

      protected List<String> extractSupportedZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Extract the supported zones property from the access services option.
      Parameters:
      accessServiceOptions - options passed to the access service.
      accessServiceFullName - name of calling service
      auditLog - audit log for error messages
      Returns:
      null or list of zone names
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - the supported zones property is not a list of zone names.
    • extractPublishZones

      protected List<String> extractPublishZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Extract the publish zones property from the access services option.
      Parameters:
      accessServiceOptions - options passed to the access service.
      accessServiceFullName - name of calling service
      auditLog - audit log for error messages
      Returns:
      null or list of zone names
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - the supported zones property is not a list of zone names.
    • extractDefaultZones

      protected List<String> extractDefaultZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Extract the default zones property from the access services option.
      Parameters:
      accessServiceOptions - options passed to the access service.
      accessServiceFullName - name of calling service
      auditLog - audit log for error messages
      Returns:
      null or list of zone names
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - the supported zones property is not a list of zone names.
    • extractKarmaPointIncrement

      protected int extractKarmaPointIncrement(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Extract the karma point plateau property from the access services option.
      Parameters:
      accessServiceOptions - options passed to the access service.
      accessServiceFullName - name of calling service
      auditLog - audit log for error messages
      Returns:
      null or list of zone names
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - the supported zones property is not a list of zone names.
    • extractKarmaPointPlateau

      protected int extractKarmaPointPlateau(Map<String,Object> accessServiceOptions, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Extract the karma point plateau property from the access services option.
      Parameters:
      accessServiceOptions - options passed to the access service.
      accessServiceFullName - name of calling service
      auditLog - audit log for error messages
      Returns:
      null or list of zone names
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - the supported zones property is not a list of zone names.
    • registerWithEnterpriseTopic

      protected void registerWithEnterpriseTopic(String accessServiceFullName, String serverName, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector omrsTopicConnector, org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListener omrsTopicListener, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Register a listener with the enterprise topic connector.
      Parameters:
      accessServiceFullName - name of calling access service
      serverName - name of OMAG Server instance
      omrsTopicConnector - topic connector to register with
      omrsTopicListener - listener to register
      auditLog - audit log to record messages
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem with topic connection
    • getTopicName

      protected String getTopicName(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
      Return the name of the topic extracted from the endpoint of the topic's Connection.
      Parameters:
      connection - connection object
      Returns:
      topic name
    • getInTopicEventBusConnector

      protected org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector getInTopicEventBusConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection inTopicConnection, String accessServiceFullName, org.odpi.openmetadata.frameworks.auditlog.AuditLog parentAuditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Create the connector for this access services' In Topic.
      Parameters:
      inTopicConnection - connection from the configuration properties
      accessServiceFullName - name of the calling access service
      parentAuditLog - audit log from the admin component
      Returns:
      connector to access the topic
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem creating connector
    • getOutTopicEventBusConnector

      protected org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector getOutTopicEventBusConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection outTopicEventBusConnection, String accessServiceName, org.odpi.openmetadata.frameworks.auditlog.AuditLog parentAuditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Create the event bus connector for this access services' Out Topic.
      Parameters:
      outTopicEventBusConnection - connection from the configuration properties - the event bus
      accessServiceName - name of the calling access service
      parentAuditLog - audit log from the admin component
      Returns:
      connector to access the topic
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem creating connector
    • getOutTopicConnection

      protected org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection getOutTopicConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection outTopicEventBusConnection, String accessServiceFullName, String accessServiceConnectorProviderClassName, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Create the connector for this access services' Out Topic.
      Parameters:
      outTopicEventBusConnection - connection from the configuration properties - the event bus
      accessServiceFullName - name of the calling access service
      accessServiceConnectorProviderClassName - class name of connector provider
      auditLog - audit log from the admin component
      Returns:
      connector to access the topic
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem creating connector
    • throwUnexpectedInitializationException

      protected void throwUnexpectedInitializationException(String actionDescription, String fullAccessServiceName, Throwable error) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Log that an unexpected exception was received during start up.
      Parameters:
      actionDescription - calling method
      fullAccessServiceName - name of the access service
      error - exception that was caught
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - wrapped exception
    • getTopicConnector

      public <T> T getTopicConnector(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection topicConnection, Class<T> topicConnectorClass, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog, String accessServiceFullName, String methodName) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Create an instance of an open metadata topic connector using the supplied connection.
      Type Parameters:
      T - type name
      Parameters:
      topicConnection - connection needed to create the connector
      topicConnectorClass - class to cast to
      accessServiceFullName - name of the calling access service
      auditLog - audit log for this connector
      methodName - calling method
      Returns:
      connector to access the topic
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem creating connector