Class OMAGServerPlatformConfigurationClient
- java.lang.Object
-
- org.odpi.openmetadata.adminservices.client.OMAGServerPlatformConfigurationClient
-
public class OMAGServerPlatformConfigurationClient extends Object
OMAGServerPlatformConfigurationClient provides services to configure an OMAG Server Platform. There are two aspects to this. Firstly setting up the connector for the configuration document store. Then secondly, configuring the platform security connector.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringadminUserIdprotected StringserverPlatformRootURL
-
Constructor Summary
Constructors Constructor Description OMAGServerPlatformConfigurationClient(String adminUserId, String serverPlatformRootURL)Create a new client with no authentication embedded in the HTTP request.OMAGServerPlatformConfigurationClient(String adminUserId, String serverPlatformRootURL, String connectionUserId, String connectionPassword)Create a new client that passes a connection userId and password in each HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearConfigurationStoreConnection()Clear the connection object for the configuration store which means the platform uses the default store.voidclearPlatformSecurityConnection()Clear the connection object for platform security.Set<OMAGServerConfig>getAllServerConfigurations()Return all the OMAG Server configurations that are stored on this platformConnectiongetConfigurationStoreConnection()Return the connection object for the configuration store.ConnectiongetPlatformSecurityConnection()Return the connection object for platform security connector.voidsetConfigurationStoreConnection(Connection connection)Override the default implementation or configuration of the configuration document store.voidsetPlatformSecurityConnection(Connection connection)Set up a platform security connector.
-
-
-
Constructor Detail
-
OMAGServerPlatformConfigurationClient
public OMAGServerPlatformConfigurationClient(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.
-
OMAGServerPlatformConfigurationClient
public OMAGServerPlatformConfigurationClient(String adminUserId, String serverPlatformRootURL, String connectionUserId, String connectionPassword) throws OMAGInvalidParameterException
Create a new client that passes a connection userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is passed as the admin userId.- Parameters:
adminUserId- administrator's (end user's) userId to associate with calls.serverPlatformRootURL- the network address of the server running the admin servicesconnectionUserId- caller's system userId embedded in all HTTP requestsconnectionPassword- caller's system password embedded in all HTTP requests- Throws:
OMAGInvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
setConfigurationStoreConnection
public void setConfigurationStoreConnection(Connection connection) throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException
Override the default implementation or configuration of the configuration document store.- Parameters:
connection- connection object that defines the configuration document store- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearConfigurationStoreConnection
public void clearConfigurationStoreConnection() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorExceptionClear the connection object for the configuration store which means the platform uses the default store.- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getConfigurationStoreConnection
public Connection getConfigurationStoreConnection() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException
Return the connection object for the configuration store. Null is returned if the server is using the default store with the default configuration.- Returns:
- Platform security connection
- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setPlatformSecurityConnection
public void setPlatformSecurityConnection(Connection connection) throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException
Set up a platform security connector. This connector provides additional authorization checks on API requests to the platform.- Parameters:
connection- connection object that defines the platform security connector- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearPlatformSecurityConnection
public void clearPlatformSecurityConnection() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorExceptionClear the connection object for platform security. This means there is no platform security set up and there will be no authorization checks within the platform. All security will have to come from the surrounding deployment environment. This is the default state.- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getPlatformSecurityConnection
public Connection getPlatformSecurityConnection() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException
Return the connection object for platform security connector. Null is returned if no platform security has been set up.- Returns:
- Platform security connection
- Throws:
OMAGNotAuthorizedException- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getAllServerConfigurations
public Set<OMAGServerConfig> getAllServerConfigurations() throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterException
Return 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.
-
-