Class ConfigurationManagementClient
java.lang.Object
org.odpi.openmetadata.adminservices.client.ConfigurationManagementClient
ConfigurationManagementClient is able to issue calls to an OMAG Server Platform that manages configuration
for OMAG Servers. This includes storing and retrieving configuration and deploying it between platforms.
-
Constructor Summary
ConstructorDescriptionConfigurationManagementClient
(String adminUserId, String serverPlatformRootURL) Create a new client with no authentication embedded in the HTTP request.ConfigurationManagementClient
(String adminUserId, String serverPlatformRootURL, String userId, String password) Create a new client that passes userId and password in each HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
deployOMAGServerConfig
(String serverName, String destinationPlatformURLRoot) Push the configuration for the server to another OMAG Server Platform.Return all the OMAG Server configurations that are stored on this platform.getOMAGServerConfig
(String serverName) Return the complete set of configuration properties in use by the server.void
setOMAGServerConfig
(OMAGServerConfig serverConfig) Set up the configuration properties for an OMAG Server in a single command.
-
Constructor Details
-
ConfigurationManagementClient
public ConfigurationManagementClient(String adminUserId, String serverPlatformRootURL) throws OMAGInvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
adminUserId
- administrator's (end user's) userId to associate with calls.serverPlatformRootURL
- the network address of the server running the admin services- Throws:
OMAGInvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
ConfigurationManagementClient
public ConfigurationManagementClient(String adminUserId, String serverPlatformRootURL, String userId, String password) throws OMAGInvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
adminUserId
- administrator's (end user's) userId to associate with calls.serverPlatformRootURL
- the network address of the server running the admin servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
OMAGInvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
getAllServerConfigurations
public Set<OMAGServerConfig> getAllServerConfigurations() throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterExceptionReturn all the OMAG Server configurations that are stored on this platform.- Returns:
- the OMAG Server configurations that are stored on this platform
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid parameter.OMAGConfigurationErrorException
- unusual state in the admin server.
-
setOMAGServerConfig
public void setOMAGServerConfig(OMAGServerConfig serverConfig) throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterException Set up the configuration properties for an OMAG Server in a single command.- Parameters:
serverConfig
- configuration for the server- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGConfigurationErrorException
- something went wrong with the REST call stack.OMAGInvalidParameterException
- invalid serverName or destinationPlatform parameter.
-
deployOMAGServerConfig
public void deployOMAGServerConfig(String serverName, String destinationPlatformURLRoot) throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterException Push the configuration for the server to another OMAG Server Platform.- Parameters:
serverName
- local server namedestinationPlatformURLRoot
- location of the platform where the config is to be deployed to- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGConfigurationErrorException
- something went wrong with the REST call stack.OMAGInvalidParameterException
- invalid serverName or destinationPlatform parameter.
-
getOMAGServerConfig
public OMAGServerConfig getOMAGServerConfig(String serverName) throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException Return the complete set of configuration properties in use by the server.- Parameters:
serverName
- local server name- Returns:
- OMAGServerConfig properties
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid serverName parameter.OMAGConfigurationErrorException
- something went wrong with the REST call stack.
-