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.
    Version:
    $Revision$, $Date$
    • Constructor Summary

      Constructors 
      Constructor Description
      CMS()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CMSEngine getCMSEngine()  
      static java.lang.String getLogMessage​(java.lang.String msgID, java.lang.Object... params)
      Retrieves log message from LogMessages.properties or audit-events.properties.
      static java.lang.String getProductName()
      Return the product name from /usr/share/pki/CS_SERVER_VERSION which is provided by the server theme package.
      static java.lang.String getProductVersion()  
      static java.lang.String getUserMessage​(java.lang.String msgID, java.lang.String... params)
      Retrieves the localized user message from UserMessages.properties.
      static java.lang.String getUserMessage​(java.util.Locale locale, java.lang.String msgID, java.lang.String... params)
      Retrieves the localized user message from UserMessages.properties.
      static boolean isSensitive​(java.lang.String name)
      Check whether the string is contains password
      static void setCMSEngine​(CMSEngine engine)  
      • Methods inherited from class java.lang.Object

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

      • CMS

        public CMS()
    • Method Detail

      • getCMSEngine

        public static CMSEngine getCMSEngine()
      • setCMSEngine

        public static void setCMSEngine​(CMSEngine engine)
      • getProductName

        public static java.lang.String getProductName()
                                               throws java.lang.Exception
        Return the product name from /usr/share/pki/CS_SERVER_VERSION which is provided by the server theme package.
        Throws:
        java.lang.Exception
      • getProductVersion

        public static java.lang.String getProductVersion()
      • getUserMessage

        public static java.lang.String getUserMessage​(java.lang.String msgID,
                                                      java.lang.String... params)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        msgID - message id defined in UserMessages.properties
        params - 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... params)
        Retrieves the localized user message from UserMessages.properties.
        Parameters:
        locale - end-user locale
        msgID - message id defined in UserMessages.properties
        params - an array of parameters
        Returns:
        localized user message
      • getLogMessage

        public static java.lang.String getLogMessage​(java.lang.String msgID,
                                                     java.lang.Object... params)
        Retrieves log message from LogMessages.properties or audit-events.properties.
        Parameters:
        msgID - message ID defined in LogMessages.properties or audit-events.properties
        params - string parameters
        Returns:
        localized log message
      • 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