Package com.netscape.cmscore.apps
Class CMS
- java.lang.Object
-
- com.netscape.cmscore.apps.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$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_FILE
static int
DEBUG_INFORM
static int
DEBUG_OBNOXIOUS
static int
DEBUG_VERBOSE
static org.slf4j.Logger
logger
static int
PRE_OP_MODE
static int
RUNNING_MODE
-
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 passwordstatic void
setCMSEngine(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.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.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
-
-