Package com.netscape.cmscore.util
Class UtilMessage
java.lang.Object
com.netscape.cmscore.util.UtilMessage
This object is used to easily create I18N messages for utility
classes and standalone programs.
- Version:
- $Revision$, $Date$
- Author:
- mikep
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a message from a base exception.UtilMessage
(String msgFormat) Constructs a message eventUtilMessage
(String msgFormat, Exception exception) Constructs a message from an exception.UtilMessage
(String msgFormat, Object[] params) Constructs a message event with a list of parameters that will be substituted into the message format.UtilMessage
(String msgFormat, String param) Constructs a message with a parameter. -
Method Summary
-
Field Details
-
mParams
-
-
Constructor Details
-
UtilMessage
Constructs a message event- Parameters:
msgFormat
- the message string
-
UtilMessage
-
UtilMessage
Constructs a message from an exception. It can be used to carry a system exception that may contain information about the context. For example,try { ... } catch (IOExeption e) { out.println(new UtilMessage("Encountered System Error {0}", e); }
- Parameters:
msgFormat
- exception details in message string formatexception
- system exception
-
UtilMessage
Constructs a message from a base exception. This will use the msgFormat from the exception itself.try { ... } catch (Exception e) { System.out.println(new UtilMessage(e)); }
- Parameters:
e
- CMS exception
-
UtilMessage
-
-
Method Details
-
getMessage
-
getParameters
Returns a list of parameters.- Returns:
- list of message format parameters
-
toString
-
toString
-
getBundleName
Gets the resource bundle name for this class instance. This should be overridden by subclasses who have their own resource bundles.
-