org.apache.commons.validator
Class Msg
java.lang.Object
org.apache.commons.validator.Msg
- Cloneable, Serializable
public class Msg
extends java.lang.Object
implements Cloneable, Serializable
An alternative message can be associated with a Field
and a pluggable validator instead of using the default message
stored in the ValidatorAction
(aka pluggable validator).
Instances of this class are configured with a <msg> xml element.
protected String | bundle - The resource bundle name that this Msg's
key should be
resolved in (optional).
|
protected String | key - The key or value of the argument.
|
protected String | name - The name dependency that this argument goes with (optional).
|
protected boolean | resource - Whether or not the key is a message resource (optional).
|
Object | clone() - Creates and returns a copy of this object.
|
String | getBundle() - Returns the resource bundle name.
|
String | getKey() - Gets the key/value.
|
String | getName() - Gets the name of the dependency.
|
boolean | isResource() - Tests whether or not the key is a resource key or literal value.
|
void | setBundle(String bundle) - Sets the resource bundle name.
|
void | setKey(String key) - Sets the key/value.
|
void | setName(String name) - Sets the name of the dependency.
|
void | setResource(boolean resource) - Sets whether or not the key is a resource.
|
String | toString() - Returns a string representation of the object.
|
bundle
protected String bundle
The resource bundle name that this Msg's key
should be
resolved in (optional).
- Validator 1.1
key
protected String key
The key or value of the argument.
name
protected String name
The name dependency that this argument goes with (optional).
resource
protected boolean resource
Whether or not the key is a message resource (optional). Defaults to
true. If it is 'true', the value will try to be resolved as a message
resource.
- Validator 1.1.4
clone
public Object clone()
Creates and returns a copy of this object.
getBundle
public String getBundle()
Returns the resource bundle name.
- Validator 1.1
getKey
public String getKey()
Gets the key/value.
getName
public String getName()
Gets the name of the dependency.
isResource
public boolean isResource()
Tests whether or not the key is a resource key or literal value.
true
if key is a resource key.
- Validator 1.1.4
setBundle
public void setBundle(String bundle)
Sets the resource bundle name.
bundle
- The new bundle name.
- Validator 1.1
setKey
public void setKey(String key)
Sets the key/value.
setName
public void setName(String name)
Sets the name of the dependency.
setResource
public void setResource(boolean resource)
Sets whether or not the key is a resource.
resource
- If true indicates the key is a resource.
- Validator 1.1.4
toString
public String toString()
Returns a string representation of the object.
Copyright (c) 2001-2004 Apache Software Foundation