Class ServerOperationsClient
java.lang.Object
org.odpi.openmetadata.serveroperations.client.ServerOperationsClient
ServerOperationsClient is the client for issuing queries about an OMAG Server
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerOperationsClient(String platformName, String platformRootURL, String secretStoreProvider, String secretStoreLocation, String secretStoreCollection, AuditLog auditLog) Create a new client with bearer token from supplied secrets store.ServerOperationsClient(String platformName, String platformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) Create a new client with bearer token from supplied secrets store. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOpenMetadataArchive(String serverName, Connection connection) Add a new open metadata archive to running repository.voidaddOpenMetadataArchiveContent(String serverName, OpenMetadataArchive openMetadataArchive) Add a new open metadata archive to running repository.voidaddOpenMetadataArchiveFile(String serverName, String fileName) Add a new open metadata archive to running repository.getActiveConfiguration(String serverName) Return the configuration used for the current active instance of the server.getActiveServerStatus(String serverName) Return the status of a running server (use platform services to find out if the server is running).getActiveServices(String serverName) Retrieve a list of the active services on a servergetServerStatus(String serverName) Retrieve the server status
-
Field Details
-
auditLog
-
-
Constructor Details
-
ServerOperationsClient
public ServerOperationsClient(String platformName, String platformRootURL, String secretStoreProvider, String secretStoreLocation, String secretStoreCollection, AuditLog auditLog) throws InvalidParameterException Create a new client with bearer token from supplied secrets store.- Parameters:
platformName- name of the platform to connect toplatformRootURL- the network address of the server running the OMAG PlatformsecretStoreProvider- 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.
-
ServerOperationsClient
public ServerOperationsClient(String platformName, String platformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) throws InvalidParameterExceptionCreate a new client with bearer token from supplied secrets store.- Parameters:
platformName- name of the platform to connect toplatformRootURL- the network address of the server running the OMAS REST 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.
-
-
Method Details
-
getServerStatus
public ServerStatus getServerStatus(String serverName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the server status- Parameters:
serverName- the name of the server- Returns:
- The server status
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getActiveConfiguration
public OMAGServerConfig getActiveConfiguration(String serverName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Return the configuration used for the current active instance of the server. Null is returned if the server instance is not running.- Parameters:
serverName- server to start- Returns:
- configuration properties used to initialize the server or null if not running
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.PropertyServerException- unusual state in the platform.
-
getActiveServerStatus
public ServerServicesStatus getActiveServerStatus(String serverName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Return the status of a running server (use platform services to find out if the server is running).- Parameters:
serverName- server to start- Returns:
- status of the server
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.PropertyServerException- unusual state in the platform.
-
getActiveServices
public List<String> getActiveServices(String serverName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve a list of the active services on a server- Parameters:
serverName- name of the server- Returns:
- List of service names
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
addOpenMetadataArchiveFile
public void addOpenMetadataArchiveFile(String serverName, String fileName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
serverName- server to startfileName- name of the open metadata archive file.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.PropertyServerException- unusual state in the platform.
-
addOpenMetadataArchive
public void addOpenMetadataArchive(String serverName, Connection connection) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
serverName- server to startconnection- connection for the open metadata archive.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.PropertyServerException- unusual state in the platform.
-
addOpenMetadataArchiveContent
public void addOpenMetadataArchiveContent(String serverName, OpenMetadataArchive openMetadataArchive) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
serverName- server to startopenMetadataArchive- openMetadataArchive for the open metadata archive.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.PropertyServerException- unusual state in the platform.
-