|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.mdm.base.text.UserMessage
Common abstract class for holding a text message. A message instance has the following features :
formatMessage(Locale)
). As each instance
is able to hold a specific raw string for various locales, the raw string to use for display is
looked up according the nearest Locale
.MessageFormat
mechanisms for substituting parameters encoded in the localized raw string.
MessageFormat
Method Summary | |
static UserMessageString |
createError(String message)
Shortcut for creating a simple error message. |
static UserMessageString |
createError(String message,
Throwable anException)
Shortcut for creating a simple error message, with the throwable specified. |
static UserMessageString |
createInfo(String message)
Shortcut for creating a simple information message. |
static UserMessageString |
createWarning(String message)
Shortcut for creating a simple warning message. |
String |
formatMessage(Locale aLocale)
Returns this message for the locale specified. |
abstract String |
getInternalId()
Returns a specific identifier for logging and technical audit. |
Severity |
getSeverity()
|
Throwable |
getThrowable()
Returns the throwable that is associated to this message, or null
if there is no such throwable. |
boolean |
isError()
Returns true if this message is an error. |
boolean |
isFatal()
Returns true if this message is a fatal error. |
boolean |
isInfo()
Returns true if this message has information level. |
boolean |
isWarning()
Returns true if this message is a warning. |
void |
setSeverity(Severity severity)
Sets the severity of this message. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static UserMessageString createError(String message)
public static UserMessageString createError(String message, Throwable anException)
public static UserMessageString createInfo(String message)
public static UserMessageString createWarning(String message)
public String formatMessage(Locale aLocale)
public abstract String getInternalId()
null
if this message has no identifier (this
is the case for a UserMessageString
).
public boolean isError()
true
if this message is an error.
public boolean isFatal()
true
if this message is a fatal error.
public boolean isInfo()
true
if this message has information level.
public boolean isWarning()
true
if this message is a warning.
public Severity getSeverity()
setSeverity(Severity)
public void setSeverity(Severity severity)
Default severity is Severity.INFO
.
public Throwable getThrowable()
null
if there is no such throwable.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.