org.jboss.seam.international.status
Class MessagesImpl

java.lang.Object
  extended by org.jboss.seam.international.status.MessagesImpl
All Implemented Interfaces:
Serializable, Messages

@RequestScoped
public class MessagesImpl
extends Object
implements Messages

An implementation of the Messages interface.

Author:
Serialized Form

Constructor Summary
MessagesImpl()
           
 
Method Summary
 void add(Message message)
          Add a Message object to the pending message cache.
 void add(MessageBuilder builder)
          Add a MessageBuilder object to the pending builder cache.
 void clear()
          Clear all pending messages.
 BundleTemplateMessage error(BundleKey message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 BundleTemplateMessage error(BundleKey message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage error(String message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage error(String message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 BundleTemplateMessage fatal(BundleKey message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 BundleTemplateMessage fatal(BundleKey message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage fatal(String message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage fatal(String message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 Set<Message> getAll()
          Retrieve all pending Messages in their final state - as they will be displayed to the user.
 BundleTemplateMessage info(BundleKey message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 BundleTemplateMessage info(BundleKey message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage info(String message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage info(String message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 boolean isEmpty()
          Return true if there are no pending Message or MessageBuilder objects in the queue.
 BundleTemplateMessage warn(BundleKey message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 BundleTemplateMessage warn(BundleKey message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage warn(String message)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 TemplateMessage warn(String message, Object... params)
          Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagesImpl

public MessagesImpl()
Method Detail

clear

public void clear()
Description copied from interface: Messages
Clear all pending messages.

Specified by:
clear in interface Messages

isEmpty

public boolean isEmpty()
Description copied from interface: Messages
Return true if there are no pending Message or MessageBuilder objects in the queue.

Specified by:
isEmpty in interface Messages

getAll

public Set<Message> getAll()
Description copied from interface: Messages
Retrieve all pending Messages in their final state - as they will be displayed to the user. Calling this method will call MessageBuilder.build() on any queued MessageBuilder instances, adding the resulting Message objects to the message cache, and clearing the builders from the builder cache.

Specified by:
getAll in interface Messages

add

public void add(Message message)
Description copied from interface: Messages
Add a Message object to the pending message cache. Messages remain pending until cleared by and displayed in the View Layer, or until cleared manually by calling Messages.clear(), or until the user's Session expires.

Note: Duplicate messages are ignored.

Specified by:
add in interface Messages

add

public void add(MessageBuilder builder)
Description copied from interface: Messages
Add a MessageBuilder object to the pending builder cache. A subsequent call to Messages.getAll() will trigger, MessageBuilder.build() to be called called on each builder added in this way.

Specified by:
add in interface Messages

info

public BundleTemplateMessage info(BundleKey message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
info in interface Messages

info

public BundleTemplateMessage info(BundleKey message,
                                  Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
info in interface Messages

warn

public BundleTemplateMessage warn(BundleKey message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
warn in interface Messages

warn

public BundleTemplateMessage warn(BundleKey message,
                                  Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
warn in interface Messages

error

public BundleTemplateMessage error(BundleKey message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
error in interface Messages

error

public BundleTemplateMessage error(BundleKey message,
                                   Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
error in interface Messages

fatal

public BundleTemplateMessage fatal(BundleKey message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
fatal in interface Messages

fatal

public BundleTemplateMessage fatal(BundleKey message,
                                   Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
fatal in interface Messages

info

public TemplateMessage info(String message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
info in interface Messages

info

public TemplateMessage info(String message,
                            Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
info in interface Messages

warn

public TemplateMessage warn(String message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
warn in interface Messages

warn

public TemplateMessage warn(String message,
                            Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
warn in interface Messages

error

public TemplateMessage error(String message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
error in interface Messages

error

public TemplateMessage error(String message,
                             Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
error in interface Messages

fatal

public TemplateMessage fatal(String message)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
fatal in interface Messages

fatal

public TemplateMessage fatal(String message,
                             Object... params)
Description copied from interface: Messages
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.

Specified by:
fatal in interface Messages


Copyright © 2011 Seam Framework. All Rights Reserved.