org.jboss.seam.international.status
Interface Messages

All Superinterfaces:
Serializable

@RequestScoped
public interface Messages
extends Serializable

A convenient way to add messages to be displayed to the user as Feedback, Toast, Alerts, etc.

It is the responsibility of the view-layer technology to consume and perform operations required to display any messages added in this way.

Author:
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.
 

Method Detail

clear

void clear()
Clear all pending messages.


isEmpty

boolean isEmpty()
Return true if there are no pending Message or MessageBuilder objects in the queue.


getAll

Set<Message> getAll()
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.


add

void add(Message message)
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 clear(), or until the user's Session expires.

Note: Duplicate messages are ignored.


add

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


info

BundleTemplateMessage info(BundleKey message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


info

BundleTemplateMessage info(BundleKey message,
                           Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


warn

BundleTemplateMessage warn(BundleKey message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


warn

BundleTemplateMessage warn(BundleKey message,
                           Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


error

BundleTemplateMessage error(BundleKey message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


error

BundleTemplateMessage error(BundleKey message,
                            Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


fatal

BundleTemplateMessage fatal(BundleKey message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


fatal

BundleTemplateMessage fatal(BundleKey message,
                            Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


info

TemplateMessage info(String message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


info

TemplateMessage info(String message,
                     Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


warn

TemplateMessage warn(String message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


warn

TemplateMessage warn(String message,
                     Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


error

TemplateMessage error(String message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


error

TemplateMessage error(String message,
                      Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


fatal

TemplateMessage fatal(String message)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.


fatal

TemplateMessage fatal(String message,
                      Object... params)
Create a MessageBuilder with the specified Level, add it to the internal queue, and return it.



Copyright © 2011 Seam Framework. All Rights Reserved.