Class OMAGServerPlatformConfigurationClient
java.lang.Object
org.odpi.openmetadata.adminservices.client.OMAGServerPlatformConfigurationClient
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 -
Constructor Summary
ConstructorsConstructorDescriptionOMAGServerPlatformConfigurationClient(String serverPlatformRootURL, String secretStoreProvider, String secretStoreLocation, String secretStoreCollection, AuditLog auditLog) Create a new client that passes a connection userId and password in each HTTP request.OMAGServerPlatformConfigurationClient(String serverPlatformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the connection object for the configuration store which means the platform uses the default store.voidClear the default configuration document.voidDeprecated.Return all the OMAG Server configurations that are stored on this platformReturn the connection object for the configuration store.Return the default server configuration document.Deprecated.voidsetConfigurationStoreConnection(Connection connection) Override the default implementation or configuration of the configuration document store.voidsetDefaultOMAGServerConfig(OMAGServerConfig defaultServerConfig) Override the default server configuration document.voidsetPlatformSecurityConnection(Connection connection) Deprecated.
-
Field Details
-
serverPlatformRootURL
-
-
Constructor Details
-
OMAGServerPlatformConfigurationClient
public OMAGServerPlatformConfigurationClient(String serverPlatformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) throws InvalidParameterExceptionCreate a new client with no authentication embedded in the HTTP request.- Parameters:
serverPlatformRootURL- the network address of the server running the admin servicessecretsStoreConnectorMap- connectors to secrets storesauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
OMAGServerPlatformConfigurationClient
public OMAGServerPlatformConfigurationClient(String serverPlatformRootURL, String secretStoreProvider, String secretStoreLocation, String secretStoreCollection, AuditLog auditLog) throws InvalidParameterException 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:
serverPlatformRootURL- the network address of the server running the admin servicessecretStoreProvider- class name of the secrets storesecretStoreLocation- location (networkAddress) of the secrets storesecretStoreCollection- name of the collection of secrets to use to connect to the remote serverauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
setDefaultOMAGServerConfig
public void setDefaultOMAGServerConfig(OMAGServerConfig defaultServerConfig) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the default server configuration document.- Parameters:
defaultServerConfig- values to include in every new configured server.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getDefaultOMAGServerConfig
public OMAGServerConfig getDefaultOMAGServerConfig() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionReturn the default server configuration document.- Returns:
- connection response
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearDefaultServerConfig
public void clearDefaultServerConfig() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionClear the default configuration document.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setConfigurationStoreConnection
public void setConfigurationStoreConnection(Connection connection) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the default implementation or configuration of the configuration document store.- Parameters:
connection- connection object that defines the configuration document store- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearConfigurationStoreConnection
public void clearConfigurationStoreConnection() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionClear the connection object for the configuration store which means the platform uses the default store.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getConfigurationStoreConnection
public Connection getConfigurationStoreConnection() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionReturn 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:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setPlatformSecurityConnection
@Deprecated public void setPlatformSecurityConnection(Connection connection) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Deprecated.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:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearPlatformSecurityConnection
@Deprecated public void clearPlatformSecurityConnection() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionDeprecated.Clear 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:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getPlatformSecurityConnection
@Deprecated public Connection getPlatformSecurityConnection() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionDeprecated.Return the connection object for platform security connector. Null is returned if no platform security has been set up.- Returns:
- Platform security connection
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getAllServerConfigurations
public Set<OMAGServerConfig> getAllServerConfigurations() throws UserNotAuthorizedException, OMAGConfigurationErrorException, InvalidParameterExceptionReturn all the OMAG Server configurations that are stored on this platform- Returns:
- the OMAG Server configurations that are stored on this platform
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-