org.jboss.seam.international
Class StatusMessages

java.lang.Object
  extended by org.jboss.seam.international.StatusMessages
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FacesMessages

public abstract class StatusMessages
extends Object
implements Serializable

Abstract base class for providing status messages. View layers should provide a concrete implementation.

Author:
Pete Muir
See Also:
Serialized Form

Field Summary
static String COMPONENT_NAME
           
 
Constructor Summary
StatusMessages()
           
 
Method Summary
 void add(org.hibernate.validator.InvalidValue iv)
          Add an InvalidValue from Hibernate Validator.
 void add(org.hibernate.validator.InvalidValue[] ivs)
          Add an array of InvalidValues from Hibernate Validator.
 void add(StatusMessage.Severity severity, String messageTemplate, Object... params)
          Create a new status message, with the messageTemplate is as the message.
 void add(StatusMessage.Severity severity, String key, String detailKey, String messageTemplate, String messageDetailTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void add(String messageTemplate, Object... params)
          Create a new status message, with the messageTemplate is as the message.
 void addFromResourceBundle(StatusMessage.Severity severity, String key, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addFromResourceBundle(String key, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addFromResourceBundleOrDefault(StatusMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addFromResourceBundleOrDefault(String key, String defaultMessageTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addToControl(org.hibernate.validator.InvalidValue iv)
          Add an InvalidValue from Hibernate Validator.
 void addToControl(String id, org.hibernate.validator.InvalidValue iv)
          Add an InvalidValue from Hibernate Validator.
 void addToControl(String id, StatusMessage.Severity severity, String messageTemplate, Object... params)
          Create a new status message, with the messageTemplate is as the message.
 void addToControl(String id, StatusMessage.Severity severity, String key, String messageTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addToControl(String id, String messageTemplate, Object... params)
          Create a new status message, with the messageTemplate is as the message.
 void addToControlFromResourceBundle(String id, StatusMessage.Severity severity, String key, Object... params)
          Create a new status message, looking up the message in the resource bundle using the provided key.
 void addToControlFromResourceBundle(String id, String key, Object... params)
          Create a new status message, looking up the message in the resource bundle using the provided key.
 void addToControlFromResourceBundleOrDefault(String id, StatusMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addToControlFromResourceBundleOrDefault(String id, String key, String defaultMessageTemplate, Object... params)
          Add a status message, looking up the message in the resource bundle using the provided key.
 void addToControls(org.hibernate.validator.InvalidValue[] ivs)
          Add an array of InvalidValues from Hibernate Validator.
 void clear()
          Clear all status messages
 void clearGlobalMessages()
           
 void clearKeyedMessages(String id)
           
protected  void doRunTasks()
           
protected  Map<String,List<StatusMessage>> getKeyedMessages()
           
protected  List<StatusMessage> getMessages()
           
static StatusMessages instance()
           
protected static void runTasks()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_NAME

public static final String COMPONENT_NAME
See Also:
Constant Field Values
Constructor Detail

StatusMessages

public StatusMessages()
Method Detail

getMessages

protected List<StatusMessage> getMessages()

getKeyedMessages

protected Map<String,List<StatusMessage>> getKeyedMessages()

clear

public void clear()
Clear all status messages


clearKeyedMessages

public void clearKeyedMessages(String id)

clearGlobalMessages

public void clearGlobalMessages()

add

public void add(StatusMessage.Severity severity,
                String key,
                String detailKey,
                String messageTemplate,
                String messageDetailTemplate,
                Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. You can also specify the severity, and parameters to be interpolated


addToControl

public void addToControl(String id,
                         StatusMessage.Severity severity,
                         String key,
                         String messageTemplate,
                         Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated


add

public void add(String messageTemplate,
                Object... params)
Create a new status message, with the messageTemplate is as the message. A severity of INFO will be used, and you can specify paramters to be interpolated


add

public void add(StatusMessage.Severity severity,
                String messageTemplate,
                Object... params)
Create a new status message, with the messageTemplate is as the message. You can also specify the severity, and parameters to be interpolated


addToControl

public void addToControl(String id,
                         String messageTemplate,
                         Object... params)
Create a new status message, with the messageTemplate is as the message. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. A severity of INFO will be used, and you can specify parameters to be interpolated


addToControl

public void addToControl(String id,
                         StatusMessage.Severity severity,
                         String messageTemplate,
                         Object... params)
Create a new status message, with the messageTemplate is as the message. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated


addFromResourceBundle

public void addFromResourceBundle(String key,
                                  Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. A severity of INFO will be used, and you can specify parameters to be interpolated


addFromResourceBundle

public void addFromResourceBundle(StatusMessage.Severity severity,
                                  String key,
                                  Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. You can also specify the severity, and parameters to be interpolated


addFromResourceBundleOrDefault

public void addFromResourceBundleOrDefault(String key,
                                           String defaultMessageTemplate,
                                           Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. A severity of INFO will be used, and you can specify parameters to be interpolated


addFromResourceBundleOrDefault

public void addFromResourceBundleOrDefault(StatusMessage.Severity severity,
                                           String key,
                                           String defaultMessageTemplate,
                                           Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. You can also specify the severity, and parameters to be interpolated


addToControlFromResourceBundle

public void addToControlFromResourceBundle(String id,
                                           String key,
                                           Object... params)
Create a new status message, looking up the message in the resource bundle using the provided key. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. A severity of INFO will be used, and you can specify parameters to be interpolated


addToControlFromResourceBundle

public void addToControlFromResourceBundle(String id,
                                           StatusMessage.Severity severity,
                                           String key,
                                           Object... params)
Create a new status message, looking up the message in the resource bundle using the provided key. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated


addToControlFromResourceBundleOrDefault

public void addToControlFromResourceBundleOrDefault(String id,
                                                    String key,
                                                    String defaultMessageTemplate,
                                                    Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. A severity of INFO will be used, and you can specify parameters to be interpolated


addToControlFromResourceBundleOrDefault

public void addToControlFromResourceBundleOrDefault(String id,
                                                    StatusMessage.Severity severity,
                                                    String key,
                                                    String defaultMessageTemplate,
                                                    Object... params)
Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated


add

public void add(org.hibernate.validator.InvalidValue[] ivs)
Add an array of InvalidValues from Hibernate Validator. Each message will be added with a severity of WARN.


addToControls

public void addToControls(org.hibernate.validator.InvalidValue[] ivs)
Add an array of InvalidValues from Hibernate Validator. Each message will be added with a severity of WARN. The name of the property that was validated will be used as the widget ID


add

public void add(org.hibernate.validator.InvalidValue iv)
Add an InvalidValue from Hibernate Validator. The message will be added with a severity of WARN.


addToControl

public void addToControl(org.hibernate.validator.InvalidValue iv)
Add an InvalidValue from Hibernate Validator. The message will be added with a severity of WARN. The name of the property that was validated will be used as the widget ID


addToControl

public void addToControl(String id,
                         org.hibernate.validator.InvalidValue iv)
Add an InvalidValue from Hibernate Validator. The message will be added with a severity of WARN. You can also specify the id of the widget to add the message to


runTasks

protected static void runTasks()

doRunTasks

protected void doRunTasks()

instance

public static StatusMessages instance()