org.apache.struts.action
Class ActionMessage
java.lang.Object
org.apache.struts.action.ActionMessage
- Serializable
public class ActionMessage
extends java.lang.Object
implements Serializable
An encapsulation of an individual message returned by the
validate
method of an ActionForm
, consisting
of a message key (to be used to look up message text in an appropriate
message resources database) plus up to four placeholder objects that can
be used for parametric replacement in the message text.
$Rev: 164530 $ $Date: 2005-04-25 04:11:07 +0100 (Mon, 25 Apr 2005) $protected String | key - The message key for this message.
|
protected boolean | resource - Indicates whether the key is taken to be as a bundle key [true] or literal value [false].
|
protected Object[] | values - The replacement values for this mesasge.
|
ActionMessage(String key) - Construct an action message with no replacement values.
|
ActionMessage(String key, Object value0) - Construct an action message with the specified replacement values.
|
ActionMessage(String key, Object value0, Object value1) - Construct an action message with the specified replacement values.
|
ActionMessage(String key, Object value0, Object value1, Object value2) - Construct an action message with the specified replacement values.
|
ActionMessage(String key, Object value0, Object value1, Object value2, Object value3) - Construct an action message with the specified replacement values.
|
ActionMessage(String key, Object[] values) - Construct an action message with the specified replacement values.
|
ActionMessage(String key, boolean resource) - Construct an action message with the specified replacement values.
|
String | getKey() - Get the message key for this message.
|
Object[] | getValues() - Get the replacement values for this message.
|
boolean | isResource() - Indicate whether the key is taken to be as a bundle key [true] or literal value [false].
|
String | toString() - Returns a String in the format: key[value1, value2, etc].
|
key
protected String key
The message key for this message.
resource
protected boolean resource
Indicates whether the key is taken to be as a bundle key [true] or literal value [false].
values
protected Object[] values
The replacement values for this mesasge.
ActionMessage
public ActionMessage(String key)
Construct an action message with no replacement values.
key
- Message key for this message
ActionMessage
public ActionMessage(String key,
Object value0)
Construct an action message with the specified replacement values.
key
- Message key for this messagevalue0
- First replacement value
ActionMessage
public ActionMessage(String key,
Object value0,
Object value1)
Construct an action message with the specified replacement values.
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement value
ActionMessage
public ActionMessage(String key,
Object value0,
Object value1,
Object value2)
Construct an action message with the specified replacement values.
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement valuevalue2
- Third replacement value
ActionMessage
public ActionMessage(String key,
Object value0,
Object value1,
Object value2,
Object value3)
Construct an action message with the specified replacement values.
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement valuevalue2
- Third replacement valuevalue3
- Fourth replacement value
ActionMessage
public ActionMessage(String key,
Object[] values)
Construct an action message with the specified replacement values.
key
- Message key for this messagevalues
- Array of replacement values
ActionMessage
public ActionMessage(String key,
boolean resource)
Construct an action message with the specified replacement values.
key
- Message key for this messageresource
- Indicates whether the key is a bundle key or literal value
getKey
public String getKey()
Get the message key for this message.
getValues
public Object[] getValues()
Get the replacement values for this message.
isResource
public boolean isResource()
Indicate whether the key is taken to be as a bundle key [true] or literal value [false].
toString
public String toString()
Returns a String in the format: key[value1, value2, etc].
java.lang.Object.toString()
Copyright B) 2000-2007 - The Apache Software Foundation