Class Message

java.lang.Object
com.echothree.util.common.message.Message
All Implemented Interfaces:
Serializable

public class Message extends 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.

Since:
Struts 1.1
See Also:
  • Field Details

    • key

      protected String key
      The message key for this message.
    • values

      protected Object[] values
      The replacement values for this mesasge.
    • message

      protected String message
      The message for this message, with all value substitutions completed.
  • Constructor Details

    • Message

      public Message(String key)
      Creates a new instance of Message
    • Message

      public Message(String key, Object... values)
      Creates a new instance of Message
  • Method Details

    • getKey

      public String getKey()
      Get the message key for this message.
    • getValues

      public Object[] getValues()
      Get the replacement values for this message.
    • getMessage

      public String getMessage()
      Get the message for this message.
    • setMessage

      public void setMessage(String message)
      Set the message for this message.
    • toString

      public String toString()
      Converts to a string representing the data contained within this Message.
      Overrides:
      toString in class Object