Class OMAGServerOperationsClient


  • public class OMAGServerOperationsClient
    extends java.lang.Object
    OMAGServerOperationsClient provides services to start and stop an OMAG Server.
    • Field Detail

      • adminUserId

        protected java.lang.String adminUserId
      • serverName

        protected java.lang.String serverName
      • serverPlatformRootURL

        protected java.lang.String serverPlatformRootURL
      • restClient

        protected org.odpi.openmetadata.adminservices.client.AdminServicesRESTClient restClient
    • Constructor Detail

      • OMAGServerOperationsClient

        public OMAGServerOperationsClient​(java.lang.String adminUserId,
                                          java.lang.String serverName,
                                          java.lang.String serverPlatformRootURL)
                                   throws org.odpi.openmetadata.adminservices.ffdc.exception.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.
        serverName - name of the server to connect to
        serverPlatformRootURL - the network address of the server running the admin services
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • OMAGServerOperationsClient

        public OMAGServerOperationsClient​(java.lang.String adminUserId,
                                          java.lang.String serverName,
                                          java.lang.String serverPlatformRootURL,
                                          java.lang.String connectionUserId,
                                          java.lang.String connectionPassword)
                                   throws org.odpi.openmetadata.adminservices.ffdc.exception.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.
        serverName - name of the server to connect to
        serverPlatformRootURL - the network address of the server running the admin services
        connectionUserId - caller's system userId embedded in all HTTP requests
        connectionPassword - caller's system password embedded in all HTTP requests
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • Method Detail

      • activateWithStoredConfig

        public java.lang.String activateWithStoredConfig()
                                                  throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                                         org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                                         org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.
        Returns:
        success message
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • activateWithSuppliedConfig

        public java.lang.String activateWithSuppliedConfig​(OMAGServerConfig configuration)
                                                    throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                                           org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                                           org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Activate the open metadata and governance services using the supplied configuration document.
        Parameters:
        configuration - properties used to initialize the services
        Returns:
        success message
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • deactivateTemporarily

        public void deactivateTemporarily()
                                   throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                          org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                          org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Temporarily deactivate any open metadata and governance services.
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • deactivatePermanently

        public void deactivatePermanently()
                                   throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                          org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                          org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Permanently deactivate any open metadata and governance services and unregister from any cohorts.
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • getActiveConfiguration

        public OMAGServerConfig getActiveConfiguration()
                                                throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                                       org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                                       org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Return the configuration used for the current active instance of the server. Null is returned if the server instance is not running.
        Returns:
        configuration properties used to initialize the server or null if not running
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • getServerStatus

        public ServerServicesStatus getServerStatus()
                                             throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                                    org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                                    org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Return the status of a running server (use platform services to find out if the server is running).
        Returns:
        status of the server
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • addOpenMetadataArchiveFile

        public void addOpenMetadataArchiveFile​(java.lang.String fileName)
                                        throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                               org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                               org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Add a new open metadata archive to running repository.
        Parameters:
        fileName - name of the open metadata archive file.
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.
      • addOpenMetadataArchive

        public void addOpenMetadataArchive​(Connection connection)
                                    throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException,
                                           org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException,
                                           org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Add a new open metadata archive to running repository.
        Parameters:
        connection - connection for the open metadata archive.
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGNotAuthorizedException - the supplied userId is not authorized to issue this command.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException - invalid parameter.
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - unusual state in the admin server.