|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.validator.ErrorMessages
public class ErrorMessages
VirtualContainer for ErrorMessages relating to a single operation on
the same object.
| Field Summary | |
|---|---|
static ResourceBundle |
BUNDLE
|
| Constructor Summary | |
|---|---|
ErrorMessages()
|
|
| Method Summary | |
|---|---|
void |
addMessage(ErrorMessage msg)
|
static ErrorMessages |
fromXML(String xml)
Decodes object from xml (which resulted from a call
to toXML() } using XMLDecoder and returns the resulting
object. |
List<ErrorMessage> |
getMessages()
|
String |
getObjectClass()
|
String |
getObjectName()
|
String |
getObjHeaderMsgFormatId()
|
void |
merge(ErrorMessages msgs)
|
static ErrorMessages |
merge(ErrorMessages msgsA,
ErrorMessages msgsB)
|
static ErrorMessages |
oneMessage(String msgFormatId,
String value)
Helper method that handles the most common case of creating a new ErrorMessages object and populating it with a single message. |
static ErrorMessages |
oneMessage(String msgFormatId,
String[] msgArgs)
See oneMessage(String, String) for description. |
static ErrorMessages |
oneMessage(String msgFormatId,
String[] msgArgs,
int[] resolvableArgIndexes)
See oneMessage(String, String[]) for description, where this method
allows you to specify that one or more of the provided msgArgs may need to
resolved (looked up as keys in the resource bundle). |
void |
setAttributeIds(String attributeId)
|
void |
setHeaderInfo(String headerMsgFormatId,
String objectClass,
String objectName,
String attrFormatId)
|
void |
setMessages(List<ErrorMessage> messages)
|
void |
setObjectClass(String objectClass)
|
void |
setObjectName(String objectName)
|
void |
setObjHeaderMsgFormatId(String objHeaderMsgFormatId)
|
String |
toResolvedString(org.springframework.context.MessageSource msgSrc)
Calls toResolvedString(org.springframework.context.MessageSource, java.util.Locale)
with null locale. |
String |
toResolvedString(org.springframework.context.MessageSource msgSrc,
Locale locale)
Resolve all contained messages using resource bundles referred to by msgSrc and provided
locale, and return it. |
String |
toString()
|
String |
toXML()
Encode object using XMLEncoder and returns resulting text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static ResourceBundle BUNDLE
| Constructor Detail |
|---|
public ErrorMessages()
| Method Detail |
|---|
public String getObjHeaderMsgFormatId()
public void setObjHeaderMsgFormatId(String objHeaderMsgFormatId)
public String getObjectClass()
public void setObjectClass(String objectClass)
public String getObjectName()
public void setObjectName(String objectName)
public void addMessage(ErrorMessage msg)
public void setHeaderInfo(String headerMsgFormatId,
String objectClass,
String objectName,
String attrFormatId)
public void setAttributeIds(String attributeId)
public List<ErrorMessage> getMessages()
ErrorMessage].public void setMessages(List<ErrorMessage> messages)
public void merge(ErrorMessages msgs)
public static ErrorMessages merge(ErrorMessages msgsA,
ErrorMessages msgsB)
public String toXML()
public static ErrorMessages fromXML(String xml)
xml (which resulted from a call
to toXML() } using XMLDecoder and returns the resulting
object.
public String toResolvedString(org.springframework.context.MessageSource msgSrc,
Locale locale)
throws org.springframework.context.NoSuchMessageException
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)
throws org.springframework.context.NoSuchMessageException
toResolvedString(org.springframework.context.MessageSource, java.util.Locale)
with null locale.
org.springframework.context.NoSuchMessageExceptionpublic String toString()
toString in class ObjecttoXML().
public static ErrorMessages oneMessage(String msgFormatId,
String value)
ErrorMessages object and populating it with a single message.
msgFormatId - Id which can ultimately be used to look up a
message format string in a resource bundle.value - Value which caused an error.
public static ErrorMessages oneMessage(String msgFormatId,
String[] msgArgs)
oneMessage(String, String) for description.
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.
public static ErrorMessages oneMessage(String msgFormatId,
String[] msgArgs,
int[] resolvableArgIndexes)
oneMessage(String, String[]) for description, where this method
allows you to specify that one or more of the provided msgArgs may need to
resolved (looked up as keys in the resource bundle). Where such args do not resolve, their
literal text will be used.
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.resolvableArgIndexes - Array containing indexes into msgArgs which should be the framework
should attempt to resolve.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||