Class FlashWrapper
- All Implemented Interfaces:
Map<String,
,Object> 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 push the implementation being wrapped to the
constructor and use getWrapped()
to access the instance being wrapped.
- Since:
- 2.2
-
Nested Class Summary
-
Field Summary
Fields inherited from class javax.faces.context.Flash
NULL_VALUE
-
Constructor Summary
ConstructorDescriptionDeprecated.Use the other constructor taking the implementation being wrapped.FlashWrapper
(Flash wrapped) If this flash has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
The default behavior of this method is to callMap.clear()
on the wrappedFlash
object.boolean
containsKey
(Object key) The default behavior of this method is to callMap.containsKey(Object)
on the wrappedFlash
object.boolean
containsValue
(Object value) The default behavior of this method is to callMap.containsValue(Object)
on the wrappedFlash
object.void
The default behavior of this method is to callFlash.doPostPhaseActions(FacesContext)
on the wrappedFlash
object.void
The default behavior of this method is to callFlash.doPrePhaseActions(FacesContext)
on the wrappedFlash
object.entrySet()
The default behavior of this method is to callMap.entrySet()
on the wrappedFlash
object.The default behavior of this method is to callMap.get(Object)
on the wrappedFlash
object.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 callMap.isEmpty()
on the wrappedFlash
object.boolean
The default behavior of this method is to callFlash.isKeepMessages()
on the wrappedFlash
object.boolean
The default behavior of this method is to callFlash.isRedirect()
on the wrappedFlash
object.void
The default behavior of this method is to callFlash.keep(String)
on the wrappedFlash
object.keySet()
The default behavior of this method is to callMap.keySet()
on the wrappedFlash
object.The default behavior of this method is to callMap.put(K, V)
on the wrappedFlash
object.void
The default behavior of this method is to callMap.putAll(Map)
on the wrappedFlash
object.void
The default behavior of this method is to callFlash.putNow(String, Object)
on the wrappedFlash
object.The default behavior of this method is to callMap.remove(Object)
on the wrappedFlash
object.void
setKeepMessages
(boolean newValue) The default behavior of this method is to callFlash.setKeepMessages(boolean)
on the wrappedFlash
object.void
setRedirect
(boolean newValue) The default behavior of this method is to callFlash.setRedirect(boolean)
on the wrappedFlash
object.int
size()
The default behavior of this method is to callMap.size()
on the wrappedFlash
object.values()
The default behavior of this method is to callMap.values()
on the wrappedFlash
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
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
FlashWrapper
Deprecated.Use the other constructor taking the implementation being wrapped. -
FlashWrapper
If this flash has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The
getWrapped()
will then return the implementation being wrapped.- Parameters:
wrapped
- The implementation being wrapped.- Since:
- 2.3
-
-
Method Details
-
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 interfaceFacesWrapper<Flash>
- Returns:
- the wrapped instance.
-
doPostPhaseActions
The default behavior of this method is to call
Flash.doPostPhaseActions(FacesContext)
on the wrappedFlash
object.- Specified by:
doPostPhaseActions
in classFlash
- Parameters:
ctx
- theFacesContext
for this request.- Since:
- 2.2
-
doPrePhaseActions
The default behavior of this method is to call
Flash.doPrePhaseActions(FacesContext)
on the wrappedFlash
object.- Specified by:
doPrePhaseActions
in classFlash
- Parameters:
ctx
- theFacesContext
for this request.- Since:
- 2.2
-
isKeepMessages
public boolean isKeepMessages()The default behavior of this method is to call
Flash.isKeepMessages()
on the wrappedFlash
object.- Specified by:
isKeepMessages
in classFlash
- Returns:
- the boolean flag whether keeping messages or not.
- Since:
- 2.2
-
isRedirect
public boolean isRedirect()The default behavior of this method is to call
Flash.isRedirect()
on the wrappedFlash
object.- Specified by:
isRedirect
in classFlash
- Returns:
- the value of this property for the flash for this session.
- Since:
- 2.2
-
keep
The default behavior of this method is to call
Flash.keep(String)
on the wrappedFlash
object.- Specified by:
keep
in classFlash
- Parameters:
key
- if argumentkey
is the name of an entry previously stored to the flash on this traversal through the lifecycle via a call toFlash.putNow(java.lang.String, java.lang.Object)
, or to a set to the EL expression#{flash.now.<key>}
, or to the requestMap
, to be promoted to the flash as if a call toput()
or a set to the expression#{flash.<key>}
was being called.- Since:
- 2.2
-
putNow
The default behavior of this method is to call
Flash.putNow(String, Object)
on the wrappedFlash
object. -
setKeepMessages
public void setKeepMessages(boolean newValue) The default behavior of this method is to call
Flash.setKeepMessages(boolean)
on the wrappedFlash
object.- Specified by:
setKeepMessages
in classFlash
- 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 wrappedFlash
object.- Specified by:
setRedirect
in classFlash
- 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 wrappedFlash
object. -
containsKey
The default behavior of this method is to call
Map.containsKey(Object)
on the wrappedFlash
object.- Specified by:
containsKey
in interfaceMap<String,
Object> - Since:
- 2.2
-
containsValue
The default behavior of this method is to call
Map.containsValue(Object)
on the wrappedFlash
object.- Specified by:
containsValue
in interfaceMap<String,
Object> - Since:
- 2.2
-
entrySet
The default behavior of this method is to call
Map.entrySet()
on the wrappedFlash
object. -
get
The default behavior of this method is to call
Map.get(Object)
on the wrappedFlash
object. -
isEmpty
public boolean isEmpty()The default behavior of this method is to call
Map.isEmpty()
on the wrappedFlash
object. -
keySet
The default behavior of this method is to call
Map.keySet()
on the wrappedFlash
object. -
put
The default behavior of this method is to call
Map.put(K, V)
on the wrappedFlash
object. -
putAll
The default behavior of this method is to call
Map.putAll(Map)
on the wrappedFlash
object. -
remove
The default behavior of this method is to call
Map.remove(Object)
on the wrappedFlash
object. -
size
public int size()The default behavior of this method is to call
Map.size()
on the wrappedFlash
object. -
values
The default behavior of this method is to call
Map.values()
on the wrappedFlash
object.
-