com.scooterframework.web.controller
Class FlashMessage

java.lang.Object
  extended by com.scooterframework.web.controller.FlashMessage
All Implemented Interfaces:
java.io.Serializable

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

FlashMessage contains information for the next request only.

See Also:
Serialized Form

Constructor Summary
FlashMessage()
           
 
Method Summary
 void addMessage(java.lang.String type, Message message)
           
 void addMessage(java.lang.String type, java.lang.String message)
           
 int count()
          Counts number of messages.
 java.util.List<Message> getAll(java.lang.String type)
          Returns all messages for the specific type.
 java.lang.String getFirst(java.lang.String type)
          Returns the first message for the specific type
 java.lang.String getLast(java.lang.String type)
          Returns the last message for the specific type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlashMessage

public FlashMessage()
Method Detail

addMessage

public void addMessage(java.lang.String type,
                       java.lang.String message)

addMessage

public void addMessage(java.lang.String type,
                       Message message)

getAll

public java.util.List<Message> getAll(java.lang.String type)
Returns all messages for the specific type.

Parameters:
type -
Returns:
list of messages associated with the type

getFirst

public java.lang.String getFirst(java.lang.String type)
Returns the first message for the specific type

Parameters:
type -
Returns:
message associated with the type

getLast

public java.lang.String getLast(java.lang.String type)
Returns the last message for the specific type

Parameters:
type -
Returns:
message associated with the type

count

public int count()
Counts number of messages.

Returns:
int number of messages.