Class OMAGServerAdminStoreServices

java.lang.Object
org.odpi.openmetadata.adminservices.server.OMAGServerAdminStoreServices

public class OMAGServerAdminStoreServices extends Object
OMAGServerAdminStoreServices provides the capability to store and retrieve configuration documents. A configuration document provides the configuration information for a server. By default, a server's configuration document is stored in its own file. However, it is possible to override the default location using setConfigurationStoreConnection. This override affects all server instances in this process.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    Clear the connection object for the configuration store.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    Clear the default configuration document.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    Clear the placeholder variables.
    org.odpi.openmetadata.adminservices.rest.ConnectionResponse
    Return the connection object for the configuration store.
    org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse
    Return the default server configuration document.
    org.odpi.openmetadata.commonservices.ffdc.rest.StringMapResponse
    Return the placeholder variables that will be used on each server start up.
    org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig
    getServerConfig(String userId, String serverName, boolean adminCall, String methodName)
    Retrieve any saved configuration for this server.
    org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig
    getServerConfigForStartUp(String userId, String serverName, String methodName)
    Retrieve any saved configuration for this server.
    void
    saveServerConfig(String serverName, String methodName, org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig serverConfig)
    Save the server's config ...
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    setConfigurationStoreConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
    Override the default location of the configuration documents.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    setDefaultOMAGServerConfig(String userId, org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig defaultServerConfig)
    Override the default server configuration document.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    setPlaceholderVariables(String userId, Map<String,String> placeholderVariables)
    Set up the placeholder variables that will be used on each server start up.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OMAGServerAdminStoreServices

      public OMAGServerAdminStoreServices()
  • Method Details

    • setDefaultOMAGServerConfig

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setDefaultOMAGServerConfig(String userId, org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig defaultServerConfig)
      Override the default server configuration document.
      Parameters:
      userId - calling user.
      defaultServerConfig - values to include in every new configured server.
      Returns:
      void response
    • getDefaultOMAGServerConfig

      public org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse getDefaultOMAGServerConfig(String userId)
      Return the default server configuration document.
      Parameters:
      userId - calling user
      Returns:
      OMAGServerConfig response
    • clearDefaultOMAGServerConfig

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearDefaultOMAGServerConfig(String userId)
      Clear the default configuration document.
      Parameters:
      userId - calling user
      Returns:
      void response
    • setPlaceholderVariables

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setPlaceholderVariables(String userId, Map<String,String> placeholderVariables)
      Set up the placeholder variables that will be used on each server start up.
      Parameters:
      userId - calling user.
      placeholderVariables - map of variable name to value.
      Returns:
      void response
    • getPlaceholderVariables

      public org.odpi.openmetadata.commonservices.ffdc.rest.StringMapResponse getPlaceholderVariables(String userId)
      Return the placeholder variables that will be used on each server start up.
      Parameters:
      userId - calling user
      Returns:
      string map response
    • clearPlaceholderVariables

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearPlaceholderVariables(String userId)
      Clear the placeholder variables.
      Parameters:
      userId - calling user
      Returns:
      void response
    • setConfigurationStoreConnection

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setConfigurationStoreConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
      Override the default location of the configuration documents.
      Parameters:
      userId - calling user.
      connection - connection used to create and configure the connector that interacts with the real store.
      Returns:
      void response
    • getConfigurationStoreConnection

      public org.odpi.openmetadata.adminservices.rest.ConnectionResponse getConfigurationStoreConnection(String userId)
      Return the connection object for the configuration store. Null is returned if the server should use the default store.
      Parameters:
      userId - calling user
      Returns:
      connection response
    • clearConfigurationStoreConnection

      public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearConfigurationStoreConnection(String userId)
      Clear the connection object for the configuration store.
      Parameters:
      userId - calling user
      Returns:
      connection response
    • getServerConfig

      public org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig getServerConfig(String userId, String serverName, boolean adminCall, String methodName) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Retrieve any saved configuration for this server.
      Parameters:
      userId - calling user
      serverName - name of the server
      adminCall - flag to indicate whether the
      methodName - method requesting the server details
      Returns:
      configuration properties
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - problem with the configuration file
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - user not authorized to make these changes
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - problem with the configuration document
    • getServerConfigForStartUp

      public org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig getServerConfigForStartUp(String userId, String serverName, String methodName) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
      Retrieve any saved configuration for this server.
      Parameters:
      userId - calling user
      serverName - name of the server
      methodName - method requesting the server details
      Returns:
      configuration properties
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - problem with the configuration file
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - user not authorized to make these changes
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unable to parse the OMAGServerConfig
    • saveServerConfig

      public void saveServerConfig(String serverName, String methodName, org.odpi.openmetadata.adminservices.configuration.properties.OMAGServerConfig serverConfig) throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException
      Save the server's config ...
      Parameters:
      serverName - name of the server
      methodName - method requesting the server details
      serverConfig - properties to save
      Throws:
      org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - problem with the config file