javax.faces.context
Class FlashWrapper

java.lang.Object
  extended by javax.faces.context.Flash
      extended by javax.faces.context.FlashWrapper
All Implemented Interfaces:
Map<String,Object>, FacesWrapper<Flash>

public abstract class FlashWrapper
extends Flash
implements FacesWrapper<Flash>

Provides a simple implementation of Flash that can be subclassed by developers wishing to provide specialized behavior to an existing Flash instance. The default implementation of all methods is to call through to the wrapped Flash.

Usage: extend this class and override getWrapped() to return the instance we are wrapping.

Since:
2.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class javax.faces.context.Flash
NULL_VALUE
 
Constructor Summary
FlashWrapper()
           
 
Method Summary
 void clear()
          

The default behavior of this method is to call Map.clear() on the wrapped Flash object.

 boolean containsKey(Object key)
          

The default behavior of this method is to call Map.containsKey(Object) on the wrapped Flash object.

 boolean containsValue(Object value)
          

The default behavior of this method is to call Map.containsValue(Object) on the wrapped Flash object.

 void doPostPhaseActions(FacesContext ctx)
          

The default behavior of this method is to call Flash.doPostPhaseActions(FacesContext) on the wrapped Flash object.

 void doPrePhaseActions(FacesContext ctx)
          

The default behavior of this method is to call Flash.doPrePhaseActions(FacesContext) on the wrapped Flash object.

 Set<Map.Entry<String,Object>> entrySet()
          

The default behavior of this method is to call Map.entrySet() on the wrapped Flash object.

 Object get(Object key)
          

The default behavior of this method is to call Map.get(Object) on the wrapped Flash object.

abstract  Flash getWrapped()
          

A class that implements this interface uses this method to return an instance of the class being wrapped.

 boolean isEmpty()
          

The default behavior of this method is to call Map.isEmpty() on the wrapped Flash object.

 boolean isKeepMessages()
          

The default behavior of this method is to call Flash.isKeepMessages() on the wrapped Flash object.

 boolean isRedirect()
          

The default behavior of this method is to call Flash.isRedirect() on the wrapped Flash object.

 void keep(String key)
          

The default behavior of this method is to call Flash.keep(String) on the wrapped Flash object.

 Set<String> keySet()
          

The default behavior of this method is to call Map.keySet() on the wrapped Flash object.

 Object put(String key, Object value)
          

The default behavior of this method is to call Map.put(K, V) on the wrapped Flash object.

 void putAll(Map<? extends String,? extends Object> m)
          

The default behavior of this method is to call Map.putAll(Map) on the wrapped Flash object.

 void putNow(String key, Object value)
          

The default behavior of this method is to call Flash.putNow(String, Object) on the wrapped Flash object.

 Object remove(Object key)
          

The default behavior of this method is to call Map.remove(Object) on the wrapped Flash object.

 void setKeepMessages(boolean newValue)
          

The default behavior of this method is to call Flash.setKeepMessages(boolean) on the wrapped Flash object.

 void setRedirect(boolean newValue)
          

The default behavior of this method is to call Flash.setRedirect(boolean) on the wrapped Flash object.

 int size()
          

The default behavior of this method is to call Map.size() on the wrapped Flash object.

 Collection<Object> values()
          

The default behavior of this method is to call Map.values() on the wrapped Flash object.

 
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

FlashWrapper

public FlashWrapper()
Method Detail

getWrapped

public abstract Flash getWrapped()
Description copied from interface: FacesWrapper

A class that implements this interface uses this method to return an instance of the class being wrapped.

Specified by:
getWrapped in interface FacesWrapper<Flash>

doPostPhaseActions

public void doPostPhaseActions(FacesContext ctx)

The default behavior of this method is to call Flash.doPostPhaseActions(FacesContext) on the wrapped Flash object.

Specified by:
doPostPhaseActions in class Flash
Parameters:
ctx - the FacesContext for this request.
Since:
2.2

doPrePhaseActions

public void doPrePhaseActions(FacesContext ctx)

The default behavior of this method is to call Flash.doPrePhaseActions(FacesContext) on the wrapped Flash object.

Specified by:
doPrePhaseActions in class Flash
Parameters:
ctx - the FacesContext for this request.
Since:
2.2

isKeepMessages

public boolean isKeepMessages()

The default behavior of this method is to call Flash.isKeepMessages() on the wrapped Flash object.

Specified by:
isKeepMessages in class Flash
Since:
2.2

isRedirect

public boolean isRedirect()

The default behavior of this method is to call Flash.isRedirect() on the wrapped Flash object.

Specified by:
isRedirect in class Flash
Since:
2.2

keep

public void keep(String key)

The default behavior of this method is to call Flash.keep(String) on the wrapped Flash object.

Specified by:
keep in class Flash
Parameters:
key - if argument key is the name of an entry previously stored to the flash on this traversal through the lifecycle via a call to Flash.putNow(java.lang.String, java.lang.Object), or to a set to the EL expression #{flash.now.<key>}, or to the request Map, to be promoted to the flash as if a call to put() or a set to the expression #{flash.<key>} was being called.
Since:
2.2

putNow

public void putNow(String key,
                   Object value)

The default behavior of this method is to call Flash.putNow(String, Object) on the wrapped Flash object.

Specified by:
putNow in class Flash
Parameters:
key - the key for this entry
value - the value for this entry
Since:
2.2

setKeepMessages

public void setKeepMessages(boolean newValue)

The default behavior of this method is to call Flash.setKeepMessages(boolean) on the wrapped Flash object.

Specified by:
setKeepMessages in class Flash
Parameters:
newValue - the new value for this property on this session.
Since:
2.2

setRedirect

public void setRedirect(boolean newValue)

The default behavior of this method is to call Flash.setRedirect(boolean) on the wrapped Flash object.

Specified by:
setRedirect in class Flash
Parameters:
newValue - the new value for this property on this session.
Since:
2.2

clear

public void clear()

The default behavior of this method is to call Map.clear() on the wrapped Flash object.

Specified by:
clear in interface Map<String,Object>
Since:
2.2

containsKey

public boolean containsKey(Object key)

The default behavior of this method is to call Map.containsKey(Object) on the wrapped Flash object.

Specified by:
containsKey in interface Map<String,Object>
Since:
2.2

containsValue

public boolean containsValue(Object value)

The default behavior of this method is to call Map.containsValue(Object) on the wrapped Flash object.

Specified by:
containsValue in interface Map<String,Object>
Since:
2.2

entrySet

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

The default behavior of this method is to call Map.entrySet() on the wrapped Flash object.

Specified by:
entrySet in interface Map<String,Object>
Since:
2.2

get

public Object get(Object key)

The default behavior of this method is to call Map.get(Object) on the wrapped Flash object.

Specified by:
get in interface Map<String,Object>
Since:
2.2

isEmpty

public boolean isEmpty()

The default behavior of this method is to call Map.isEmpty() on the wrapped Flash object.

Specified by:
isEmpty in interface Map<String,Object>
Since:
2.2

keySet

public Set<String> keySet()

The default behavior of this method is to call Map.keySet() on the wrapped Flash object.

Specified by:
keySet in interface Map<String,Object>
Since:
2.2

put

public Object put(String key,
                  Object value)

The default behavior of this method is to call Map.put(K, V) on the wrapped Flash object.

Specified by:
put in interface Map<String,Object>
Since:
2.2

putAll

public void putAll(Map<? extends String,? extends Object> m)

The default behavior of this method is to call Map.putAll(Map) on the wrapped Flash object.

Specified by:
putAll in interface Map<String,Object>
Since:
2.2

remove

public Object remove(Object key)

The default behavior of this method is to call Map.remove(Object) on the wrapped Flash object.

Specified by:
remove in interface Map<String,Object>
Since:
2.2

size

public int size()

The default behavior of this method is to call Map.size() on the wrapped Flash object.

Specified by:
size in interface Map<String,Object>
Since:
2.2

values

public Collection<Object> values()

The default behavior of this method is to call Map.values() on the wrapped Flash object.

Specified by:
values in interface Map<String,Object>
Since:
2.2


Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms