|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.validator.ErrorMessage
public class ErrorMessage
Representation of a validation failure, which can either be passed
around in abstract string form (separate components) or converted to an
concrete error message given a ResourceBundle.
| Constructor Summary | |
|---|---|
ErrorMessage()
|
|
ErrorMessage(String msgFormatId)
|
|
ErrorMessage(String msgFormatId,
String value)
|
|
ErrorMessage(String msgFormatId,
String[] msgArgs)
|
|
ErrorMessage(String msgFormatId,
String[] msgArgs,
int[] msgResolvableIndexes)
Create an error message storing the provided arguments. |
|
| Method Summary | |
|---|---|
static ErrorMessage |
fromXML(String xml)
|
String |
getAttrHeaderMsgFormatId()
|
String |
getAttributeId()
|
String[] |
getMsgArgs()
|
String |
getMsgFormatId()
|
void |
setAttrHeaderMsgFormatId(String attrFmtId)
|
void |
setAttributeId(String attributeId)
|
void |
setMsgArgs(String[] msgArgs)
|
void |
setMsgFormatId(String msgFormatId)
|
String |
toResolvedString(org.springframework.context.MessageSource msgSrc)
Resolve message using resource bundles referred to by msgSrc and default
locale, and return it. |
String |
toResolvedString(org.springframework.context.MessageSource msgSrc,
Locale locale)
Resolve this message using resource bundles referred to by msgSrc and provided
locale, and return it. |
void |
toResolvedString(org.springframework.context.MessageSource msgSrc,
StringBuilder sb,
Locale locale)
Resolve this message using resource bundles referred to by msgSrc and provided
locale, and put results into sb. |
String |
toString()
|
String |
toXML()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorMessage()
public ErrorMessage(String msgFormatId)
public ErrorMessage(String msgFormatId,
String value)
public ErrorMessage(String msgFormatId,
String[] msgArgs)
public ErrorMessage(String msgFormatId,
String[] msgArgs,
int[] msgResolvableIndexes)
msgFormatId - Id which can ultimately be used to look up a
message format string in a resource bundle.msgArgs - Arguments to message format, where first argument
is always the value which caused the error.msgResolvableIndexes - Array containing indexes into msgArgs which should be the framework
should attempt to resolve.| Method Detail |
|---|
public String getAttributeId()
public void setAttributeId(String attributeId)
public String getAttrHeaderMsgFormatId()
public void setAttrHeaderMsgFormatId(String attrFmtId)
public String[] getMsgArgs()
public void setMsgArgs(String[] msgArgs)
public String getMsgFormatId()
public void setMsgFormatId(String msgFormatId)
public String toXML()
public static ErrorMessage fromXML(String xml)
public String toString()
toString in class Object
public void toResolvedString(org.springframework.context.MessageSource msgSrc,
StringBuilder sb,
Locale locale)
throws org.springframework.context.NoSuchMessageException
msgSrc and provided
locale, and put results into sb.
msgSrc - Spring MessageSource acting as container for one or more resource bundles
(which are possibly hierarchically chained), against which this message's format id key
will be resolved.sb - Resolved text is appended to it.locale - Locale to be used for resolution; if null then Locale.getDefault()
will be used.
org.springframework.context.NoSuchMessageException - If this error message's format id key can't be resolved.
public String toResolvedString(org.springframework.context.MessageSource msgSrc,
Locale locale)
msgSrc and provided
locale, and return it.
msgSrc - Spring MessageSource acting as container for one or more resource bundles
(which are possibly hierarchically chained), against which this message's format id key
will be resolved.locale - Locale to be used for resolution; if null then Locale.getDefault()
will be used.
org.springframework.context.NoSuchMessageException - If this error message's format id key can't be resolved.public String toResolvedString(org.springframework.context.MessageSource msgSrc)
msgSrc and default
locale, and return it.
msgSrc - Spring MessageSource acting as container for one or more resource bundles
(which are possibly hierarchically chained), against which this message's format id key
will be resolved.
org.springframework.context.NoSuchMessageException - If this error message's format id key can't be resolved.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||