org.apache.myfaces.shared_tomahawk.context.flash
Class FlashImpl

java.lang.Object
  extended by javax.faces.context.Flash
      extended by org.apache.myfaces.shared_tomahawk.context.flash.FlashImpl
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>

public class FlashImpl
extends javax.faces.context.Flash

Implementation of Flash object

Version:
$Revision: 904316 $ $Date: 2010-01-28 17:14:41 -0700 (Thu, 28 Jan 2010) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $), Jakob Korherr

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
FlashImpl(javax.faces.context.ExternalContext externalContext)
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 void doPostPhaseActions(javax.faces.context.FacesContext facesContext)
          Used to destroy the executeMap and to save all FacesMessages for the next request, but only if this is the last invocation of this method in the current lifecycle (if redirect phase 5, otherwise phase 6).
 void doPrePhaseActions(javax.faces.context.FacesContext facesContext)
          Used to restore the redirect value and the FacesMessages of the previous request and to manage the flashMap tokens for this request before phase restore view starts.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
static javax.faces.context.Flash getCurrentInstance(javax.faces.context.ExternalContext context)
          Return a Flash instance from the application map
 boolean isEmpty()
           
 boolean isKeepMessages()
          Returns the value of a previous call to setKeepMessages() from this request.
 boolean isRedirect()
          Return the value of this property for the flash for this session.
 void keep(java.lang.String key)
          Take a value from the requestMap, or if it does not exist from the execute FlashMap, and put it on the render FlashMap, so it is visible on the next request.
 java.util.Set<java.lang.String> keySet()
           
 java.lang.Object put(java.lang.String key, java.lang.Object value)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
           
 void putNow(java.lang.String key, java.lang.Object value)
          This is just an alias for the request scope map.
 java.lang.Object remove(java.lang.Object key)
           
 void setKeepMessages(boolean keepMessages)
          If this property is true, the messages should be kept for the next request, no matter if it is a normal postback case or a POST- REDIRECT-GET case.
 void setRedirect(boolean redirect)
           
 int size()
           
 java.util.Collection<java.lang.Object> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

FlashImpl

public FlashImpl(javax.faces.context.ExternalContext externalContext)
Method Detail

getCurrentInstance

public static javax.faces.context.Flash getCurrentInstance(javax.faces.context.ExternalContext context)
Return a Flash instance from the application map

Parameters:
context -
Returns:

doPrePhaseActions

public void doPrePhaseActions(javax.faces.context.FacesContext facesContext)
Used to restore the redirect value and the FacesMessages of the previous request and to manage the flashMap tokens for this request before phase restore view starts.

Specified by:
doPrePhaseActions in class javax.faces.context.Flash

doPostPhaseActions

public void doPostPhaseActions(javax.faces.context.FacesContext facesContext)
Used to destroy the executeMap and to save all FacesMessages for the next request, but only if this is the last invocation of this method in the current lifecycle (if redirect phase 5, otherwise phase 6).

Specified by:
doPostPhaseActions in class javax.faces.context.Flash

isRedirect

public boolean isRedirect()
Return the value of this property for the flash for this session. This must be false unless: - setRedirect(boolean) was called for the current lifecycle traversal with true as the argument. - The current lifecycle traversal for this session is in the "execute" phase and the previous traversal had setRedirect(boolean) called with true as the argument.

Specified by:
isRedirect in class javax.faces.context.Flash

setRedirect

public void setRedirect(boolean redirect)
Specified by:
setRedirect in class javax.faces.context.Flash

keep

public void keep(java.lang.String key)
Take a value from the requestMap, or if it does not exist from the execute FlashMap, and put it on the render FlashMap, so it is visible on the next request.

Specified by:
keep in class javax.faces.context.Flash

putNow

public void putNow(java.lang.String key,
                   java.lang.Object value)
This is just an alias for the request scope map.

Specified by:
putNow in class javax.faces.context.Flash

isKeepMessages

public boolean isKeepMessages()
Returns the value of a previous call to setKeepMessages() from this request. If there was no call yet, false is returned.

Specified by:
isKeepMessages in class javax.faces.context.Flash

setKeepMessages

public void setKeepMessages(boolean keepMessages)
If this property is true, the messages should be kept for the next request, no matter if it is a normal postback case or a POST- REDIRECT-GET case. Note that we don't have to store this value for the next request (like setRedirect()), because we will know if it was true on the next request, if we can find any stored messages in the FlashMap. (also see _saveMessages() and _restoreMessages()).

Specified by:
setKeepMessages in class javax.faces.context.Flash

clear

public void clear()

containsKey

public boolean containsKey(java.lang.Object key)

containsValue

public boolean containsValue(java.lang.Object value)

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()

get

public java.lang.Object get(java.lang.Object key)

isEmpty

public boolean isEmpty()

keySet

public java.util.Set<java.lang.String> keySet()

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)

remove

public java.lang.Object remove(java.lang.Object key)

size

public int size()

values

public java.util.Collection<java.lang.Object> values()


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.