Class ActionMessage
- All Implemented Interfaces:
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.
- Since:
- Struts 1.1
- Version:
- $Rev$ $Date: 2005-05-14 01:09:32 -0400 (Sat, 14 May 2005) $
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionActionMessage
(String key) Construct an action message with no replacement values.ActionMessage
(String key, boolean resource) Construct an action message with the specified replacement values.ActionMessage
(String key, Object value0) 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, 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.Construct an action message with the specified replacement values. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Get the message key for this message.Object[]
Get the replacement values for this message.boolean
Indicate whether the key is taken to be as a bundle key [true] or literal value [false].toString()
Returns a String in the format: key[value1, value2, etc].
-
Field Details
-
key
The message key for this message.
-
values
The replacement values for this message. -
resource
protected boolean resourceIndicates whether the key is taken to be as a bundle key [true] or literal value [false].
-
-
Constructor Details
-
ActionMessage
Construct an action message with no replacement values.
- Parameters:
key
- Message key for this message
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messagevalue0
- First replacement value
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement value
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement valuevalue2
- Third replacement value
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messagevalue0
- First replacement valuevalue1
- Second replacement valuevalue2
- Third replacement valuevalue3
- Fourth replacement value
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messagevalues
- Array of replacement values
-
ActionMessage
Construct an action message with the specified replacement values.
- Parameters:
key
- Message key for this messageresource
- Indicates whether the key is a bundle key or literal value
-
-
Method Details
-
getKey
Get the message key for this message.
- Returns:
- The message key for this message.
-
getValues
Get the replacement values for this message.
- Returns:
- 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].
- Returns:
true
if the key is a bundle key;false
otherwise.
-
toString
Returns a String in the format: key[value1, value2, etc].
-