Package com.netscape.cmscore.apps
Class CMS
- java.lang.Object
-
- com.netscape.cmscore.apps.CMS
-
public final class CMS extends java.lang.ObjectThis 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$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_FILEstatic intDEBUG_INFORMstatic intDEBUG_OBNOXIOUSstatic intDEBUG_VERBOSEstatic org.slf4j.Loggerloggerstatic intPRE_OP_MODEstatic intRUNNING_MODE
-
Constructor Summary
Constructors Constructor Description CMS()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CMSEnginegetCMSEngine()static java.lang.StringgetLogMessage(java.lang.String msgID, java.lang.Object... params)Retrieves log message from LogMessages.properties or audit-events.properties.static java.lang.StringgetProductName()Return the product name from /usr/share/pki/CS_SERVER_VERSION which is provided by the server theme package.static java.lang.StringgetProductVersion()static java.lang.StringgetUserMessage(java.lang.String msgID, java.lang.String... params)Retrieves the localized user message from UserMessages.properties.static java.lang.StringgetUserMessage(java.util.Locale locale, java.lang.String msgID, java.lang.String... params)Retrieves the localized user message from UserMessages.properties.static booleanisSensitive(java.lang.String name)Check whether the string is contains passwordstatic voidsetCMSEngine(CMSEngine engine)
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
DEBUG_OBNOXIOUS
public static final int DEBUG_OBNOXIOUS
- See Also:
- Constant Field Values
-
DEBUG_VERBOSE
public static final int DEBUG_VERBOSE
- See Also:
- Constant Field Values
-
DEBUG_INFORM
public static final int DEBUG_INFORM
- See Also:
- Constant Field Values
-
CONFIG_FILE
public static final java.lang.String CONFIG_FILE
- See Also:
- Constant Field Values
-
PRE_OP_MODE
public static final int PRE_OP_MODE
- See Also:
- Constant Field Values
-
RUNNING_MODE
public static final int RUNNING_MODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCMSEngine
public static CMSEngine getCMSEngine()
-
setCMSEngine
public static void setCMSEngine(CMSEngine engine)
-
getProductName
public static java.lang.String getProductName() throws java.lang.ExceptionReturn 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.propertiesparams- 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 localemsgID- message id defined in UserMessages.propertiesparams- 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.propertiesparams- 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
-
-