|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springmodules.validation.commons.MessageUtils
public abstract class MessageUtils
Constructor Summary | |
---|---|
MessageUtils()
|
Method Summary | |
---|---|
static MessageSourceResolvable |
createMessage(Object obj)
Create a MessageSourceResolvable using the string value of the parameter as a code. |
static Object[] |
getArgs(org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field)
Gets the message arguments based on the current ValidatorAction and Field . |
static Object |
getMessage(org.apache.commons.validator.Arg arg)
Get the message associated with the argument. |
static String |
getMessage(MessageSource messages,
Locale locale,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field)
Get a message for the given validator action and field from the specified message source. |
static String |
getMessageKey(org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field)
Gets the ActionError based on the ValidatorAction message and the Field 's
arg objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageUtils()
Method Detail |
---|
public static String getMessageKey(org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field)
ActionError
based on the ValidatorAction
message and the Field
's
arg objects.
public static Object[] getArgs(org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field)
ValidatorAction
and Field
. The array
returned here is an array of MessageSourceResolvable's that will be
resolved at a later time.
Note: this implementation is especially crappy (only four arguments are
supported), but it's the best we can do until the next version of
validator-validator is out of beta.
-param actionName
action name.
field
- the validator field.
public static Object getMessage(org.apache.commons.validator.Arg arg)
public static MessageSourceResolvable createMessage(Object obj)
obj
- Object whose string value is the code for this message.
public static String getMessage(MessageSource messages, Locale locale, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field)
messages
- MessageSource from which to get the message.locale
- Locale for for this message.va
- ValidatorAction for this message.field
- Field field for this message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |