Spring Web Flow

org.springframework.binding.message
Interface MessageContext

All Known Subinterfaces:
StateManageableMessageContext
All Known Implementing Classes:
DefaultMessageContext

public interface MessageContext

A context for recording and retrieving messages for display.


Method Summary
 void addMessage(MessageResolver messageResolver)
          Add a new message to this context.
 void clearMessages()
          Clear all messages added to this context.
 Message[] getAllMessages()
          Get all messages in this context.
 Message[] getMessagesByCriteria(MessageCriteria criteria)
          Get all messages that meet the given result criteria.
 Message[] getMessagesBySource(java.lang.Object source)
          Get all messages in this context for the source provided.
 boolean hasErrorMessages()
          Returns true if there are error messages in this context.
 

Method Detail

getAllMessages

Message[] getAllMessages()
Get all messages in this context. The messages returned should be suitable for display as-is.

Returns:
the messages

getMessagesBySource

Message[] getMessagesBySource(java.lang.Object source)
Get all messages in this context for the source provided.

Parameters:
source - the source associated with messages, or null for global messages
Returns:
the source's messages

getMessagesByCriteria

Message[] getMessagesByCriteria(MessageCriteria criteria)
Get all messages that meet the given result criteria.

Parameters:
criteria - the message criteria

hasErrorMessages

boolean hasErrorMessages()
Returns true if there are error messages in this context.

Returns:
error messages

addMessage

void addMessage(MessageResolver messageResolver)
Add a new message to this context.

Parameters:
messageResolver - the resolver that will resolve the message to be added

clearMessages

void clearMessages()
Clear all messages added to this context.


Spring Web Flow