|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.brb.mgmt.ErrorMessage
This class represents an error message intended to be displayed to the user. A particular ErrorMessage object can represent either a warning or a serious error. The type for a particular ErrorMessage can be obtained using the getMessageType() method. The text for the message can be obtained using either the getMessageText() method or the toString() method. For ErrorMessages returned by BRBeans, this text will be translated and formatted for the default system locale. There is also an error code associated with each ErrorMessage that can be used to programmatically determine what the error was. This can be obtained using the getErrorCode() method.
Field Summary | |
---|---|
static int |
CODE_BOTH_CLASSIFIER_AND_CLASSIFIED
Error code constant indicating that the rule is marked as both a classifier rule and a classified rule. |
static int |
CODE_NO_RULE_IMPLEMENTOR
Error code constant indicating that the rule has no Java rule implementor name. |
static int |
CODE_RULE_HAS_NO_START_DATE
Error code constant indicating that the rule has no start date. |
static int |
CODE_START_IS_AFTER_END
Error code constant indicating that the rule's start date is after its end date. |
static int |
CODE_UNKNOWN
Error code constant indicating that the error code is not set. |
static int |
ERROR_MESSAGE
Message type constant indicating that this object represents a serious error. |
static int |
WARNING_MESSAGE
Message type constant indicating that this object represents a warning. |
Constructor Summary | |
---|---|
ErrorMessage(java.lang.String inMessageText,
int inMessageType)
ErrorMessage constructor allowing the message text and message type to be set. |
|
ErrorMessage(java.lang.String inMessageText,
int inMessageType,
int inErrorCode)
ErrorMessage constructor allowing the message text, message type, and error code to be set. |
|
ErrorMessage(java.lang.String resourceBundleName,
java.lang.String messageKey,
java.lang.Object[] formatArguments,
java.lang.String defaultMessage,
int inMessageType)
ErrorMessage constructor. |
|
ErrorMessage(java.lang.String resourceBundleName,
java.lang.String messageKey,
java.lang.Object[] formatArguments,
java.lang.String defaultMessage,
int inMessageType,
int inErrorCode)
ErrorMessage constructor. |
Method Summary | |
---|---|
int |
getErrorCode()
Get the error code for this error. |
java.lang.String |
getMessageText()
Get the message text to be displayed to the user. |
int |
getMessageType()
Get the message type. |
java.lang.String |
toString()
Returns a String that represents the value of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ERROR_MESSAGE
public static final int WARNING_MESSAGE
public static final int CODE_UNKNOWN
public static final int CODE_RULE_HAS_NO_START_DATE
public static final int CODE_START_IS_AFTER_END
public static final int CODE_BOTH_CLASSIFIER_AND_CLASSIFIED
public static final int CODE_NO_RULE_IMPLEMENTOR
Constructor Detail |
public ErrorMessage(java.lang.String inMessageText, int inMessageType)
inMessageText
- Text to be returned by getMessageText(). The ErrorMessage object does
not do any formatting of this text. getMessageText() returns it as it is passed in.inMessageType
- Type of message. Valid values are ERROR_MESSAGE and WARNING_MESSAGE.public ErrorMessage(java.lang.String inMessageText, int inMessageType, int inErrorCode)
inMessageText
- Text to be returned by getMessageText(). The ErrorMessage object does
not do any formatting of this text. getMessageText() returns it as it is passed in.inMessageType
- Type of message. Valid values are ERROR_MESSAGE and WARNING_MESSAGE.inErrorCode
- Code indicating what error this object represents. Codes for BRBeans error
messages are defined as static constants in this class.public ErrorMessage(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultMessage, int inMessageType)
resourceBundleName
- Name of the resource bundle containing text for this message.messageKey
- Key used to look up the text in the resource bundle.formatArguments
- Replacement arguments used to format the text.defaultMessage
- Default text to use if there are errors retrieving the text from the resource bundle.inMessageType
- Type of message. Valid values are ERROR_MESSAGE and WARNING_MESSAGE.
messages are defined as static constants in this class.public ErrorMessage(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultMessage, int inMessageType, int inErrorCode)
resourceBundleName
- Name of the resource bundle containing text for this message.messageKey
- Key used to look up the text in the resource bundle.formatArguments
- Replacement arguments used to format the text.defaultMessage
- Default text to use if there are errors retrieving the text from the resource bundle.inMessageType
- Type of message. Valid values are ERROR_MESSAGE and WARNING_MESSAGE.inErrorCode
- Code indicating what error this object represents. Codes for BRBeans error
messages are defined as static constants in this class.Method Detail |
public int getErrorCode()
public java.lang.String getMessageText()
public int getMessageType()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |