Spring Web Flow

org.springframework.faces.webflow
Class FlowFacesContext.FlowFacesMessage

java.lang.Object
  extended by org.springframework.binding.message.Message
      extended by org.springframework.faces.webflow.FlowFacesContext.FlowFacesMessage
All Implemented Interfaces:
java.io.Serializable, MessageResolver
Enclosing class:
FlowFacesContext

protected static class FlowFacesContext.FlowFacesMessage
extends Message
implements MessageResolver

Adapter class to convert a FacesMessage to a Spring Message. This adapter is required to allow FacesMessages to be registered with Spring whilst still retaining their mutable nature. It is not uncommon for FacesMessages to be changed after they have been added to a FacesContext, for example, from a PhaseListener.

NOTE: Only FacesMessage instances are directly adapted, any subclasses will be converted to the standard FacesMessage implementation. This is to protect against bugs such as SWF-1073. For convenience this class also implements the MessageResolver interface.

See Also:
Serialized Form

Constructor Summary
FlowFacesContext.FlowFacesMessage(FlowFacesContext.FacesMessageSource source, javax.faces.application.FacesMessage message)
           
 
Method Summary
 javax.faces.application.FacesMessage getFacesMessage()
           
 Severity getSeverity()
          The severity of this message.
 java.lang.String getText()
          The message text.
 Message resolveMessage(org.springframework.context.MessageSource messageSource, java.util.Locale locale)
          Resolve the message from the message source using the current locale.
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.binding.message.Message
getSource, hasField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowFacesContext.FlowFacesMessage

public FlowFacesContext.FlowFacesMessage(FlowFacesContext.FacesMessageSource source,
                                         javax.faces.application.FacesMessage message)
Method Detail

getText

public java.lang.String getText()
Description copied from class: Message
The message text. The text is the message's communication payload.

Overrides:
getText in class Message
Returns:
the message text

getSeverity

public Severity getSeverity()
Description copied from class: Message
The severity of this message. The severity indicates the intensity or priority of the communication.

Overrides:
getSeverity in class Message
Returns:
the message severity

toString

public java.lang.String toString()
Overrides:
toString in class Message

resolveMessage

public Message resolveMessage(org.springframework.context.MessageSource messageSource,
                              java.util.Locale locale)
Description copied from interface: MessageResolver
Resolve the message from the message source using the current locale.

Specified by:
resolveMessage in interface MessageResolver
Parameters:
messageSource - the message source, an abstraction for a resource bundle
locale - the current locale of this request
Returns:
the resolved message

getFacesMessage

public javax.faces.application.FacesMessage getFacesMessage()
Returns:
The original FacesMessage adapted by this class.

Spring Web Flow