Class OMAGServerAdminStoreServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.adminservices.server.OMAGServerAdminStoreServices
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 -
Method Summary
Modifier and TypeMethodDescriptionclearConfigurationStoreConnection(String delegatingUserId) Clear the connection object for the configuration store.clearDefaultOMAGServerConfig(String delegatingUserId) Clear the default configuration document.clearPlaceholderVariables(String delegatingUserId) Clear the placeholder variables.getConfigurationStoreConnection(String delegatingUserId) Return the connection object for the configuration store.getDefaultOMAGServerConfig(String delegatingUserId) Return the default server configuration document.getPlaceholderVariables(String delegatingUserId) Return the placeholder variables that will be used on each server start up.getServerConfigForStartUp(String userId, String delegatingUserId, String serverName, String methodName) Retrieve any saved configuration for this server.voidsaveServerConfig(String serverName, String methodName, OMAGServerConfig serverConfig) Save the server's config ...voidsetAppPropertiesConfigurationStoreConnection(String platformUserId, Connection connection) Override the default location of the configuration documents.voidsetAppPropertiesDefaultOMAGServerConfig(String platformUserId, OMAGServerConfig defaultServerConfig) Override the default server configuration document.voidsetAppPropertiesPlaceholderVariables(String platformUserId, Map<String, String> placeholderVariables) Set up the placeholder variables that will be used on each server start up.setConfigurationStoreConnection(String delegatingUserId, Connection connection) Override the default location of the configuration documents.setDefaultOMAGServerConfig(String delegatingUserId, OMAGServerConfig defaultServerConfig) Override the default server configuration document set by the application properties.setPlaceholderVariables(String delegatingUserId, Map<String, String> placeholderVariables) Set up the placeholder variables that will be used on each server start up.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
OMAGServerAdminStoreServices
public OMAGServerAdminStoreServices()
-
-
Method Details
-
setAppPropertiesDefaultOMAGServerConfig
public void setAppPropertiesDefaultOMAGServerConfig(String platformUserId, OMAGServerConfig defaultServerConfig) Override the default server configuration document. This is called from inside the platform and represents the definition from the application.properties.- Parameters:
platformUserId- calling user.defaultServerConfig- values to include in every new configured server.
-
setDefaultOMAGServerConfig
public VoidResponse setDefaultOMAGServerConfig(String delegatingUserId, OMAGServerConfig defaultServerConfig) Override the default server configuration document set by the application properties.- Parameters:
delegatingUserId- external userId making requestdefaultServerConfig- values to include in every new configured server.- Returns:
- void response
-
getDefaultOMAGServerConfig
Return the default server configuration document.- Parameters:
delegatingUserId- external userId making request- Returns:
- OMAGServerConfig response
-
clearDefaultOMAGServerConfig
Clear the default configuration document.- Parameters:
delegatingUserId- external userId making request- Returns:
- void response
-
setAppPropertiesPlaceholderVariables
public void setAppPropertiesPlaceholderVariables(String platformUserId, Map<String, String> placeholderVariables) Set up the placeholder variables that will be used on each server start up.- Parameters:
platformUserId- calling user.placeholderVariables- map of variable name to value.
-
setPlaceholderVariables
public VoidResponse setPlaceholderVariables(String delegatingUserId, Map<String, String> placeholderVariables) Set up the placeholder variables that will be used on each server start up.- Parameters:
delegatingUserId- external userId making requestplaceholderVariables- map of variable name to value.- Returns:
- void response
-
getPlaceholderVariables
Return the placeholder variables that will be used on each server start up.- Parameters:
delegatingUserId- external userId making request- Returns:
- string map response
-
clearPlaceholderVariables
Clear the placeholder variables.- Parameters:
delegatingUserId- external userId making request- Returns:
- void response
-
setAppPropertiesConfigurationStoreConnection
public void setAppPropertiesConfigurationStoreConnection(String platformUserId, Connection connection) Override the default location of the configuration documents.- Parameters:
platformUserId- calling user.connection- connection used to create and configure the connector that interacts with the real store.
-
setConfigurationStoreConnection
Override the default location of the configuration documents.- Parameters:
delegatingUserId- external userId making requestconnection- connection used to create and configure the connector that interacts with the real store.- Returns:
- void response
-
getConfigurationStoreConnection
Return the connection object for the configuration store. Null is returned if the server should use the default store.- Parameters:
delegatingUserId- external userId making request- Returns:
- connection response
-
clearConfigurationStoreConnection
Clear the connection object for the configuration store.- Parameters:
delegatingUserId- external userId making request- Returns:
- connection response
-
getServerConfigForStartUp
public OMAGServerConfig getServerConfigForStartUp(String userId, String delegatingUserId, String serverName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, OMAGConfigurationErrorException Retrieve any saved configuration for this server.- Parameters:
userId- calling userdelegatingUserId- external userId making requestserverName- name of the servermethodName- method requesting the server details- Returns:
- configuration properties
- Throws:
InvalidParameterException- problem with the configuration fileUserNotAuthorizedException- user not authorized to make these changesOMAGConfigurationErrorException- unable to parse the OMAGServerConfig
-
saveServerConfig
public void saveServerConfig(String serverName, String methodName, OMAGServerConfig serverConfig) throws InvalidParameterException Save the server's config ...- Parameters:
serverName- name of the servermethodName- method requesting the server detailsserverConfig- properties to save- Throws:
InvalidParameterException- problem with the config file
-