Keel 2.1RC2

org.keel.util.i18n
Class Message

java.lang.Object
  extended byorg.keel.util.i18n.Message
All Implemented Interfaces:
java.io.Serializable

public class Message
extends java.lang.Object
implements java.io.Serializable

An adaptation of the ActionMessage class from Struts for use with multiple frameworks. Allows a message key and a number of parameters for replacement to be bundled together. The translation into a "presentation-ready" string is always done by the client (e.g. Struts, Cocoon, etc), not on the server side of Keel.

Version:
$Revision: 1.1 $ $Date: 2003/12/29 07:01:32 $
Author:
Craig R. McClanahan, David Winterfeldt, Michael Nash
See Also:
Serialized Form

Field Summary
protected  java.lang.String bundle
          The message bundle hint used to determine which bundle this message is found within
protected  java.lang.String key
          The message key for this message.
protected  java.lang.String resultString
           
protected  java.lang.Object[] values
          The replacement values for this mesasge.
 
Constructor Summary
Message(java.lang.String key)
          Construct an action message with no replacement values.
Message(java.lang.String key, java.lang.Object value0)
          Construct an action message with the specified replacement values.
Message(java.lang.String key, java.lang.Object[] values)
          Construct an action message with the specified replacement values.
Message(java.lang.String key, java.lang.Object value0, java.lang.Object value1)
          Construct an action message with the specified replacement values.
Message(java.lang.String key, java.lang.Object value0, java.lang.Object value1, java.lang.Object value2)
          Construct an action message with the specified replacement values.
Message(java.lang.String key, java.lang.Object value0, java.lang.Object value1, java.lang.Object value2, java.lang.Object value3)
          Construct an action message with the specified replacement values.
 
Method Summary
 java.lang.String getBundle()
           
 java.lang.String getKey()
          Get the message key for this message.
 java.lang.Object[] getValues()
          Get the replacement values for this message.
 void setBundle(java.lang.String newBundle)
           
 void setResultString(java.lang.String newString)
           
 void setValues(java.lang.Object[] newValues)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resultString

protected java.lang.String resultString

key

protected java.lang.String key
The message key for this message.


values

protected java.lang.Object[] values
The replacement values for this mesasge.


bundle

protected java.lang.String bundle
The message bundle hint used to determine which bundle this message is found within

Constructor Detail

Message

public Message(java.lang.String key)
Construct an action message with no replacement values.

Parameters:
key - Message key for this message

Message

public Message(java.lang.String key,
               java.lang.Object value0)
Construct an action message with the specified replacement values.

Parameters:
key - Message key for this message
value0 - First replacement value

Message

public Message(java.lang.String key,
               java.lang.Object value0,
               java.lang.Object value1)
Construct an action message with the specified replacement values.

Parameters:
key - Message key for this message
value0 - First replacement value
value1 - Second replacement value

Message

public Message(java.lang.String key,
               java.lang.Object value0,
               java.lang.Object value1,
               java.lang.Object value2)
Construct an action message with the specified replacement values.

Parameters:
key - Message key for this message
value0 - First replacement value
value1 - Second replacement value
value2 - Third replacement value

Message

public Message(java.lang.String key,
               java.lang.Object value0,
               java.lang.Object value1,
               java.lang.Object value2,
               java.lang.Object value3)
Construct an action message with the specified replacement values.

Parameters:
key - Message key for this message
value0 - First replacement value
value1 - Second replacement value
value2 - Third replacement value
value3 - Fourth replacement value

Message

public Message(java.lang.String key,
               java.lang.Object[] values)
Construct an action message with the specified replacement values. This constructor is used for when we have more than 4 parameters to supply for replacement.

Parameters:
key - Message key for this message
values - Array of replacement values
Method Detail

setBundle

public void setBundle(java.lang.String newBundle)

getBundle

public java.lang.String getBundle()

getKey

public java.lang.String getKey()
Get the message key for this message.


getValues

public java.lang.Object[] getValues()
Get the replacement values for this message.


setValues

public void setValues(java.lang.Object[] newValues)

setResultString

public void setResultString(java.lang.String newString)

toString

public java.lang.String toString()

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.