Class CMS


  • public final class CMS
    extends java.lang.Object
    This represents the CMS server. Plugins can access other public objects such as subsystems via this inteface. This object also include a set of utility functions. This object does not include the actual implementation. It acts as a public interface for plugins, and the actual implementation is in the CMS engine (com.netscape.cmscore.apps.CMSEngine) that implements ICMSEngine interface.
    Version:
    $Revision$, $Date$
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean areRequestsDisabled()
      Checks to ensure that all new incoming requests have been blocked.
      static void autoShutdown()  
      static void checkForAndAutoShutdown()  
      static IArgBlock createArgBlock()  
      static IArgBlock createArgBlock​(java.lang.String realm, java.util.Hashtable<java.lang.String,​java.lang.String> httpReq)  
      static IArgBlock createArgBlock​(java.util.Hashtable<java.lang.String,​java.lang.String> httpReq)  
      static ICRLIssuingPointRecord createCRLIssuingPointRecord​(java.lang.String id, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Date thisUpdate, java.util.Date nextUpdate)
      Creates an issuing poing record.
      static IConfigStore createFileConfigStore​(java.lang.String path)  
      static IRepositoryRecord createRepositoryRecord()
      Creates a repository record in the internal database.
      static void debug​(byte[] data)
      Puts data of an byte array into the debug file.
      static void debug​(int level, java.lang.String msg)
      Puts a message into the debug file.
      static void debug​(java.lang.String msg)
      Puts a message into the debug file.
      static void debug​(java.lang.Throwable e)
      Puts an exception into the debug file.
      static boolean debugOn()
      Checks if the debug mode is on or not.
      static void debugStackTrace()
      Puts the current stack trace in the debug file.
      static void disableRequests()
      Blocks all new incoming requests.
      static void forceShutdown()
      Shuts down subsystems in backwards order exceptions are ignored.
      static java.lang.String getAdminHost()
      Retrieves the host name of the server's administration service.
      static java.lang.String getAdminIP()
      Retrieves the IP address of the server's administration service.
      static java.lang.String getAdminPort()
      Retrieves the port number of the server's administration service.
      static java.lang.String getAgentHost()
      Retrieves the host name of the server's agent service.
      static java.lang.String getAgentIP()
      Retrieves the IP address of the server's agent service.
      static java.lang.String getAgentPort()
      Retrieves the port number of the server's agent service.
      static netscape.ldap.LDAPConnection getBoundConnection​(java.lang.String id, java.lang.String host, int port, int version, netscape.ldap.LDAPSSLSocketFactoryExt fac, java.lang.String bindDN, java.lang.String bindPW)  
      static ICMSEngine getCMSEngine()  
      static java.lang.String getConfigSDSessionId()  
      static IConfigStore getConfigStore()
      Returns the main config store.
      static java.lang.String getCRLIssuingPointRecordName()
      Retrieves the default CRL issuing point record name.
      static int getCSState()  
      static java.util.Date getCurrentDate()
      Returns a server wide system time.
      static java.lang.String getEEClientAuthSSLPort()
      Retrieves the host name of the server's secure end entity service.
      static java.lang.String getEEHost()
      Retrieves the host name of the server's secure end entity service.
      static java.lang.String getEENonSSLHost()
      Retrieves the host name of the server's non-secure end entity service.
      static java.lang.String getEENonSSLIP()
      Retrieves the IP address of the server's non-secure end entity service.
      static java.lang.String getEENonSSLPort()
      Retrieves the port number of the server's non-secure end entity service.
      static java.lang.String getEESSLHost()
      Retrieves the host name of the server's secure end entity service.
      static java.lang.String getEESSLIP()
      Retrieves the IP address of the server's secure end entity service.
      static java.lang.String getEESSLPort()
      Retrieves the port number of the server's secure end entity service.
      static java.lang.String getEncodedCert​(java.security.cert.X509Certificate cert)
      Retrieves the certifcate in MIME-64 encoded format with header and footer.
      static java.lang.String getInstanceDir()
      Retrieves the instance roort path of this server.
      static java.lang.String getLogMessage​(java.lang.String msgID)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.Object[] p)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8, java.lang.String p9)
      Retrieves the centralized log message from LogMessages.properties.
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8, java.lang.String p9, java.lang.String p10)
      Retrieves the centralized log message from LogMessages.properties.
      static IMailNotification getMailNotification()
      Retrieves the email notification handler.
      static IPasswordCheck getPasswordChecker()
      Retrieves the password check.
      static IPasswordStore getPasswordStore()  
      static int getPID()
      Retrieves the process id of this server.
      static byte[] getPKCS7​(java.util.Locale locale, IRequest req)  
      static IResender getResender​(IAuthority authority, java.lang.String nickname, java.lang.String clientCiphers, IRemoteAuthority remote, int interval)
      Retrieves the request sender for use with connector.
      static ISecurityDomainSessionTable getSecurityDomainSessionTable()  
      static java.lang.String getServerCertNickname()
      Retrieves the nickname of the server's server certificate.
      static java.lang.String getServerStatus()  
      static ISharedToken getSharedTokenClass​(java.lang.String configName)
      Retrieves the SharedToken class.
      static long getStartupTime()
      Retrieves time server started up.
      static ISubsystem getSubsystem​(java.lang.String name)
      Retrieves the registered subsytem with the given name.
      static java.util.Enumeration<java.lang.String> getSubsystemNames()
      Returns the names of all the registered subsystems.
      static java.lang.String getUserMessage​(java.lang.String msgID)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.lang.String msgID, java.lang.String p1)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.lang.String msgID, java.lang.String[] p)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID, java.lang.String p1)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID, java.lang.String[] p)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID, java.lang.String p1, java.lang.String p2)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3)
      Retrieves the localized user message from UserMessages.properties.
      static boolean isExcludedLdapAttr​(java.lang.String key)  
      static boolean isExcludedLdapAttrsEnabled()  
      static boolean isInRunningState()
      Is the server in running state.
      static boolean isPreOpMode()  
      static boolean isRevoked​(java.security.cert.X509Certificate[] certificates)  
      static boolean isRunningMode()  
      static boolean isSensitive​(java.lang.String name)
      Check whether the string is contains password
      static void putPasswordCache​(java.lang.String tag, java.lang.String pw)
      Puts a password entry into the single-sign on cache.
      static void setCMSEngine​(ICMSEngine engine)
      This method is used for unit tests.
      static void setConfigSDSessionId​(java.lang.String val)  
      static void setCSState​(int mode)
      mode = 0 (pre-operational) mode = 1 (running)
      static void setListOfVerifiedCerts​(int size, long interval, long unknownStateInterval)  
      static void setServerCertNickname​(java.lang.String newName)
      Sets the nickname of the server's server certificate.
      static void setServerCertNickname​(java.lang.String tokenName, java.lang.String nickName)
      Sets the nickname of the server's server certificate.
      static void shutdown()
      Shuts down subsystems in backwards order exceptions are ignored.
      static void sleepOneMinute()  
      static void terminateRequests()
      Terminates all requests that are currently in process.
      static void traceHashKey​(java.lang.String type, java.lang.String key)  
      static void traceHashKey​(java.lang.String type, java.lang.String key, java.lang.String val)  
      static void traceHashKey​(java.lang.String type, java.lang.String key, java.lang.String val, java.lang.String def)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getCMSEngine

        public static ICMSEngine getCMSEngine()
      • setCMSEngine

        public static void setCMSEngine​(ICMSEngine engine)
        This method is used for unit tests. It allows the underlying _engine to be stubbed out.
        Parameters:
        engine - The stub engine to set, for testing.
      • disableRequests

        public static void disableRequests()
        Blocks all new incoming requests.
      • terminateRequests

        public static void terminateRequests()
        Terminates all requests that are currently in process.
      • areRequestsDisabled

        public static boolean areRequestsDisabled()
        Checks to ensure that all new incoming requests have been blocked. This method is used for reentrancy protection.

        Returns:
        true or false
      • shutdown

        public static void shutdown()
        Shuts down subsystems in backwards order exceptions are ignored. process exists at end to force exit.
      • forceShutdown

        public static void forceShutdown()
        Shuts down subsystems in backwards order exceptions are ignored. process exists at end to force exit.
      • autoShutdown

        public static void autoShutdown()
      • checkForAndAutoShutdown

        public static void checkForAndAutoShutdown()
      • setCSState

        public static void setCSState​(int mode)
        mode = 0 (pre-operational) mode = 1 (running)
      • getCSState

        public static int getCSState()
      • isPreOpMode

        public static boolean isPreOpMode()
      • isRunningMode

        public static boolean isRunningMode()
      • isInRunningState

        public static boolean isInRunningState()
        Is the server in running state. After server startup, the server will be initialization state first. After the initialization state, the server will be in the running state.
        Returns:
        true if the server is in the running state
      • createRepositoryRecord

        public static IRepositoryRecord createRepositoryRecord()
        Creates a repository record in the internal database.
        Returns:
        repository record
      • createCRLIssuingPointRecord

        public static ICRLIssuingPointRecord createCRLIssuingPointRecord​(java.lang.String id,
                                                                         java.math.BigInteger crlNumber,
                                                                         java.lang.Long crlSize,
                                                                         java.util.Date thisUpdate,
                                                                         java.util.Date nextUpdate)
        Creates an issuing poing record.
        Returns:
        issuing record
      • getCRLIssuingPointRecordName

        public static java.lang.String getCRLIssuingPointRecordName()
        Retrieves the default CRL issuing point record name.
        Returns:
        CRL issuing point record name
      • getPID

        public static int getPID()
        Retrieves the process id of this server.
        Returns:
        process id of the server
      • getInstanceDir

        public static java.lang.String getInstanceDir()
        Retrieves the instance roort path of this server.
        Returns:
        instance directory path name
      • getCurrentDate

        public static java.util.Date getCurrentDate()
        Returns a server wide system time. Plugins should call this method to retrieve system time.
        Returns:
        current time
      • debug

        public static void debug​(byte[] data)
        Puts data of an byte array into the debug file.
        Parameters:
        data - byte array to be recorded in the debug file
      • debug

        public static void debug​(java.lang.String msg)
        Puts a message into the debug file.
        Parameters:
        msg - debugging message
      • debug

        public static void debug​(int level,
                                 java.lang.String msg)
        Puts a message into the debug file.
        Parameters:
        level - 0-10 (0 is less detail, 10 is more detail)
        msg - debugging message
      • debug

        public static void debug​(java.lang.Throwable e)
        Puts an exception into the debug file.
        Parameters:
        e - exception
      • debugOn

        public static boolean debugOn()
        Checks if the debug mode is on or not.
        Returns:
        true if debug mode is on
      • debugStackTrace

        public static void debugStackTrace()
        Puts the current stack trace in the debug file.
      • traceHashKey

        public static void traceHashKey​(java.lang.String type,
                                        java.lang.String key)
      • traceHashKey

        public static void traceHashKey​(java.lang.String type,
                                        java.lang.String key,
                                        java.lang.String val)
      • traceHashKey

        public static void traceHashKey​(java.lang.String type,
                                        java.lang.String key,
                                        java.lang.String val,
                                        java.lang.String def)
      • getSubsystemNames

        public static java.util.Enumeration<java.lang.String> getSubsystemNames()
        Returns the names of all the registered subsystems.
        Returns:
        a list of string-based subsystem names
      • getPKCS7

        public static byte[] getPKCS7​(java.util.Locale locale,
                                      IRequest req)
      • getSubsystem

        public static ISubsystem getSubsystem​(java.lang.String name)
        Retrieves the registered subsytem with the given name.
        Parameters:
        name - subsystem name
        Returns:
        subsystem of the given name
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.util.Locale locale,
                                                      java.lang.String msgID)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID,
                                                      java.lang.String p1)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.util.Locale locale,
                                                      java.lang.String msgID,
                                                      java.lang.String p1)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID,
                                                      java.lang.String p1,
                                                      java.lang.String p2)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.util.Locale locale,
                                                      java.lang.String msgID,
                                                      java.lang.String p1,
                                                      java.lang.String p2)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID,
                                                      java.lang.String p1,
                                                      java.lang.String p2,
                                                      java.lang.String p3)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        Returns:
        localized user message
      • getBoundConnection

        public static netscape.ldap.LDAPConnection getBoundConnection​(java.lang.String id,
                                                                      java.lang.String host,
                                                                      int port,
                                                                      int version,
                                                                      netscape.ldap.LDAPSSLSocketFactoryExt fac,
                                                                      java.lang.String bindDN,
                                                                      java.lang.String bindPW)
                                                               throws netscape.ldap.LDAPException
        Throws:
        netscape.ldap.LDAPException
      • getUserMessage

        public static java.lang.String getUserMessage​(java.util.Locale locale,
                                                      java.lang.String msgID,
                                                      java.lang.String p1,
                                                      java.lang.String p2,
                                                      java.lang.String p3)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID,
                                                      java.lang.String[] p)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        p - an array of parameters
        Returns:
        localized user message
      • getUserMessage

        public static java.lang.String getUserMessage​(java.util.Locale locale,
                                                      java.lang.String msgID,
                                                      java.lang.String[] p)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        p - an array of parameters
        Returns:
        localized user message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.Object[] p)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p - an array of parameters
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5,
                                                     java.lang.String p6)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        p6 - 6th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5,
                                                     java.lang.String p6,
                                                     java.lang.String p7)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        p6 - 6th parameter
        p7 - 7th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5,
                                                     java.lang.String p6,
                                                     java.lang.String p7,
                                                     java.lang.String p8)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        p6 - 6th parameter
        p7 - 7th parameter
        p8 - 8th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5,
                                                     java.lang.String p6,
                                                     java.lang.String p7,
                                                     java.lang.String p8,
                                                     java.lang.String p9)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        p6 - 6th parameter
        p7 - 7th parameter
        p8 - 8th parameter
        p9 - 9th parameter
        Returns:
        localized log message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.String p1,
                                                     java.lang.String p2,
                                                     java.lang.String p3,
                                                     java.lang.String p4,
                                                     java.lang.String p5,
                                                     java.lang.String p6,
                                                     java.lang.String p7,
                                                     java.lang.String p8,
                                                     java.lang.String p9,
                                                     java.lang.String p10)
        Retrieves the centralized log message from LogMessages.properties.
        Parameters:
        msgID - message id defined in LogMessages.properties
        p1 - 1st parameter
        p2 - 2nd parameter
        p3 - 3rd parameter
        p4 - 4th parameter
        p5 - 5th parameter
        p6 - 6th parameter
        p7 - 7th parameter
        p8 - 8th parameter
        p9 - 9th parameter
        p10 - 10th parameter
        Returns:
        localized log message
      • getConfigStore

        public static IConfigStore getConfigStore()
        Returns the main config store. It is a handle to CMS.cfg.
        Returns:
        configuration store
      • getStartupTime

        public static long getStartupTime()
        Retrieves time server started up.
        Returns:
        last startup time
      • getResender

        public static IResender getResender​(IAuthority authority,
                                            java.lang.String nickname,
                                            java.lang.String clientCiphers,
                                            IRemoteAuthority remote,
                                            int interval)
        Retrieves the request sender for use with connector.
        Parameters:
        authority - local authority
        nickname - nickname of the client certificate
        remote - remote authority
        interval - timeout interval
        Returns:
        resender
      • getServerCertNickname

        public static java.lang.String getServerCertNickname()
        Retrieves the nickname of the server's server certificate.
        Returns:
        nickname of the server certificate
      • setServerCertNickname

        public static void setServerCertNickname​(java.lang.String tokenName,
                                                 java.lang.String nickName)
        Sets the nickname of the server's server certificate.
        Parameters:
        tokenName - name of token where the certificate is located
        nickName - name of server certificate
      • setServerCertNickname

        public static void setServerCertNickname​(java.lang.String newName)
        Sets the nickname of the server's server certificate.
        Parameters:
        newName - new nickname of server certificate
      • getEEHost

        public static java.lang.String getEEHost()
        Retrieves the host name of the server's secure end entity service.
        Returns:
        host name of end-entity service
      • getEENonSSLHost

        public static java.lang.String getEENonSSLHost()
        Retrieves the host name of the server's non-secure end entity service.
        Returns:
        host name of end-entity non-secure service
      • getEENonSSLIP

        public static java.lang.String getEENonSSLIP()
        Retrieves the IP address of the server's non-secure end entity service.
        Returns:
        ip address of end-entity non-secure service
      • getEENonSSLPort

        public static java.lang.String getEENonSSLPort()
        Retrieves the port number of the server's non-secure end entity service.
        Returns:
        port of end-entity non-secure service
      • getEESSLHost

        public static java.lang.String getEESSLHost()
        Retrieves the host name of the server's secure end entity service.
        Returns:
        port of end-entity secure service
      • getEEClientAuthSSLPort

        public static java.lang.String getEEClientAuthSSLPort()
        Retrieves the host name of the server's secure end entity service.
        Returns:
        port of end-entity secure service
      • getEESSLIP

        public static java.lang.String getEESSLIP()
        Retrieves the IP address of the server's secure end entity service.
        Returns:
        ip address of end-entity secure service
      • getEESSLPort

        public static java.lang.String getEESSLPort()
        Retrieves the port number of the server's secure end entity service.
        Returns:
        port of end-entity secure service
      • getAgentHost

        public static java.lang.String getAgentHost()
        Retrieves the host name of the server's agent service.
        Returns:
        host name of agent service
      • getAgentIP

        public static java.lang.String getAgentIP()
        Retrieves the IP address of the server's agent service.
        Returns:
        ip address of agent service
      • getAgentPort

        public static java.lang.String getAgentPort()
        Retrieves the port number of the server's agent service.
        Returns:
        port of agent service
      • getAdminHost

        public static java.lang.String getAdminHost()
        Retrieves the host name of the server's administration service.
        Returns:
        host name of administration service
      • getAdminIP

        public static java.lang.String getAdminIP()
        Retrieves the IP address of the server's administration service.
        Returns:
        ip address of administration service
      • getAdminPort

        public static java.lang.String getAdminPort()
        Retrieves the port number of the server's administration service.
        Returns:
        port of administration service
      • getEncodedCert

        public static java.lang.String getEncodedCert​(java.security.cert.X509Certificate cert)
        Retrieves the certifcate in MIME-64 encoded format with header and footer.
        Parameters:
        cert - certificate
        Returns:
        base-64 format certificate
      • getMailNotification

        public static IMailNotification getMailNotification()
        Retrieves the email notification handler.
        Returns:
        email notification
      • getConfigSDSessionId

        public static java.lang.String getConfigSDSessionId()
      • setConfigSDSessionId

        public static void setConfigSDSessionId​(java.lang.String val)
      • getPasswordChecker

        public static IPasswordCheck getPasswordChecker()
        Retrieves the password check.
        Returns:
        default password checker
      • getSharedTokenClass

        public static ISharedToken getSharedTokenClass​(java.lang.String configName)
        Retrieves the SharedToken class.
        Returns:
        named SharedToken class
      • putPasswordCache

        public static void putPasswordCache​(java.lang.String tag,
                                            java.lang.String pw)
        Puts a password entry into the single-sign on cache.
        Parameters:
        tag - password tag
        pw - password
      • createArgBlock

        public static IArgBlock createArgBlock()
      • createArgBlock

        public static IArgBlock createArgBlock​(java.lang.String realm,
                                               java.util.Hashtable<java.lang.String,​java.lang.String> httpReq)
      • createArgBlock

        public static IArgBlock createArgBlock​(java.util.Hashtable<java.lang.String,​java.lang.String> httpReq)
      • isRevoked

        public static boolean isRevoked​(java.security.cert.X509Certificate[] certificates)
      • setListOfVerifiedCerts

        public static void setListOfVerifiedCerts​(int size,
                                                  long interval,
                                                  long unknownStateInterval)
      • getServerStatus

        public static java.lang.String getServerStatus()
      • sleepOneMinute

        public static void sleepOneMinute()
      • isExcludedLdapAttrsEnabled

        public static boolean isExcludedLdapAttrsEnabled()
      • isExcludedLdapAttr

        public static boolean isExcludedLdapAttr​(java.lang.String key)
      • isSensitive

        public static boolean isSensitive​(java.lang.String name)
        Check whether the string is contains password
        Parameters:
        name - key string
        Returns:
        whether key is a password or not