Class OMAGServerOperationalServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.serveroperations.server.OMAGServerOperationalServices
OMAGServerOperationalServices will provide support to start, manage and stop services in the OMAG Server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateAutoStartServerListWithStoredConfig(String userId, List<String> serverNames) Activate the list of open metadata and governance servers using the stored configuration information.activateWithStoredConfig(String serverName, String delegatingUserId) Activate the open metadata and governance services using the stored configuration information.activateWithStoredConfig(String userId, String delegatingUserId, String serverName) Activate the open metadata and governance services using the stored configuration information.activateWithSuppliedConfig(String userId, String delegatingUserId, String serverName, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.activateWithSuppliedConfig(String serverName, String delegatingUserId, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document.addOpenMetadataArchive(String serverName, String delegatingUserId, Connection connection) Add a new open metadata archive to running repository.addOpenMetadataArchive(String serverName, String delegatingUserId, OpenMetadataArchive openMetadataArchive) Add a new open metadata archive to running repository.addOpenMetadataArchiveFile(String serverName, String delegatingUserId, String fileName) Add a new open metadata archive to running repository.voiddeactivateRunningServiceInstances(String userId, String serverName, String methodName, OMAGOperationalServicesInstance instance, boolean permanentDeactivation) Shutdown any running services for a specific server instance.voiddeactivateTemporarilyServerList(List<String> serverNames, String delegatingUserId) Temporarily deactivate the open metadata and governance servers in th supplied list.getActiveConfiguration(String serverName, String delegatingUserId) Return the complete set of configuration properties in use by the server.getActiveServerStatus(String serverName, String delegatingUserId) Return the status of the server along with it services within.getActiveServices(String serverName, String delegatingUserId) Return the list of services that are active on a specific OMAG Server that is active on this OMAG Server Platform.shutdownAndUnregisterServer(String serverName, String delegatingUserId) Terminate any running open metadata and governance services, remove the server from any open metadata cohorts.shutdownServer(String serverName, String delegatingUserId) Temporarily deactivate any open metadata and governance services for the requested server.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
OMAGServerOperationalServices
public OMAGServerOperationalServices()
-
-
Method Details
-
activateAutoStartServerListWithStoredConfig
public SuccessMessageResponse activateAutoStartServerListWithStoredConfig(String userId, List<String> serverNames) Activate the list of open metadata and governance servers using the stored configuration information. The code works through the list, starting each server in turn. It stops if one of the servers fails to start and returns the error. Otherwise, it continues through the list, returning the successful start-up messages.- Parameters:
userId- user that is issuing the requestserverNames- list of server names- Returns:
- success message or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
activateWithStoredConfig
public SuccessMessageResponse activateWithStoredConfig(String userId, String delegatingUserId, String serverName) Activate the open metadata and governance services using the stored configuration information.- Parameters:
userId- user that is issuing the requestdelegatingUserId- external userId making requestserverName- local server name- Returns:
- success message response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
activateWithStoredConfig
Activate the open metadata and governance services using the stored configuration information.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- Returns:
- success message response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
activateWithSuppliedConfig
public SuccessMessageResponse activateWithSuppliedConfig(String serverName, String delegatingUserId, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document. Inside the configuration document are sections that each relate to an open metadata and governance subsystem. This method reads the configuration document, starting up each requested subsystem. If any subsystem throws an exception, the whole start up process is halted and the exception is returned to the caller.- Parameters:
configuration- properties used to initialize the servicesdelegatingUserId- external userId making requestserverName- local server name- Returns:
- success message response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
activateWithSuppliedConfig
public SuccessMessageResponse activateWithSuppliedConfig(String userId, String delegatingUserId, String serverName, OMAGServerConfig configuration) Activate the open metadata and governance services using the supplied configuration document. Inside the configuration document are sections that each relate to an open metadata and governance subsystem. This method reads the configuration document, starting up each requested subsystem. If any subsystem throws an exception, the whole start up process is halted and the exception is returned to the caller.- Parameters:
userId- user that is issuing the requestdelegatingUserId- external userId making requestconfiguration- properties used to initialize the servicesserverName- local server name- Returns:
- success message response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the server name is invalid or OMAGConfigurationErrorException there is a problem using the supplied configuration.
-
deactivateRunningServiceInstances
public void deactivateRunningServiceInstances(String userId, String serverName, String methodName, OMAGOperationalServicesInstance instance, boolean permanentDeactivation) throws InvalidParameterException, PropertyServerException Shutdown any running services for a specific server instance. Note that authorization checks have already occurred.- Parameters:
userId- calling userserverName- name of this servermethodName- calling methodinstance- a list of the running servicespermanentDeactivation- should the server be permanently disconnected- Throws:
InvalidParameterException- one of the services detected an invalid parameterPropertyServerException- one of the services had problems shutting down
-
deactivateTemporarilyServerList
Temporarily deactivate the open metadata and governance servers in th supplied list.- Parameters:
serverNames- list of server namesdelegatingUserId- external userId making request
-
shutdownServer
Temporarily deactivate any open metadata and governance services for the requested server.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
shutdownAndUnregisterServer
Terminate any running open metadata and governance services, remove the server from any open metadata cohorts.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException the serverName is invalid.
-
getActiveConfiguration
Return the complete set of configuration properties in use by the server.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- Returns:
- OMAGServerConfig properties or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName parameter or the server is not running.
-
getActiveServerStatus
Return the status of the server along with it services within.- Parameters:
serverName- local server namedelegatingUserId- external userId making request- Returns:
- OMAGServerConfig properties or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName parameter or the server is not running.
-
getActiveServices
Return the list of services that are active on a specific OMAG Server that is active on this OMAG Server Platform.- Parameters:
serverName- name of the server of interestdelegatingUserId- external userId making request- Returns:
- List of service names
-
addOpenMetadataArchiveFile
public VoidResponse addOpenMetadataArchiveFile(String serverName, String delegatingUserId, String fileName) Add a new open metadata archive to running repository.- Parameters:
serverName- local server name.delegatingUserId- external userId making requestfileName- name of the open metadata archive file.- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName or fileName parameter.
-
addOpenMetadataArchive
public VoidResponse addOpenMetadataArchive(String serverName, String delegatingUserId, Connection connection) Add a new open metadata archive to running repository.- Parameters:
serverName- local server name.delegatingUserId- external userId making requestconnection- connection to access the open metadata archive file.- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName or connection parameter.
-
addOpenMetadataArchive
public VoidResponse addOpenMetadataArchive(String serverName, String delegatingUserId, OpenMetadataArchive openMetadataArchive) Add a new open metadata archive to running repository.- Parameters:
serverName- local server name.delegatingUserId- external userId making requestopenMetadataArchive- contents of the open metadata archive file.- Returns:
- void response or OMAGNotAuthorizedException the supplied userId is not authorized to issue this command or OMAGInvalidParameterException invalid serverName or openMetadataArchive parameter.
-