Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.binding.message
Class Message

    java.lang.Object
      org.springframework.binding.message.Message

All Implemented Interfaces:
  java.io.Serializable

    public class Message

extends java.lang.Object
implements java.io.Serializable

An object of communication that provides text information. For example, a validation message may inform a web application user a business rule was violated. A message can be associated with a particular source element or component, has text providing the basis for communication, and has severity indicating the priority or intensity of the message for its receiver.

Author:
  Keith Donald
See Also:
  Serialized Form

Constructor Summary
`Message(java.lang.Object source, java.lang.String text, Severity severity)` Creates a new message.

Method Summary
`Severity` | `getSeverity()` The severity of this message.
`java.lang.Object` | `getSource()` A reference to the source element this message is associated with.
`java.lang.String` | `getText()` The message text.
`boolean` | `hasField()` Whether the message is associated with a field.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Message

    public Message(java.lang.Object source,
                   java.lang.String text,
                   Severity severity)

  Creates a new message.

  Parameters:
    `source` - the source of the message
    `text` - the message text
    `severity` - the message severity

Method Detail

### getSource

    public java.lang.Object getSource()

  A reference to the source element this message is associated with. This could be a field on a form in UI, or null (or empty "" in the case of global bean validation) if the message is not associated with a any particular element.

  Returns:
    the source

### getText

    public java.lang.String getText()

  The message text. The text is the message's communication payload.

  Returns:
    the message text

### getSeverity

    public Severity getSeverity()

  The severity of this message. The severity indicates the intensity or priority of the communication.

  Returns:
    the message severity

### hasField

    public boolean hasField()

  Whether the message is associated with a field.

  Returns:
    `true` if the source is a String that has text; `false` otherwise.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD