Class FlashWrapper
- java.lang.Object
- 
- jakarta.faces.context.Flash
- 
- jakarta.faces.context.FlashWrapper
 
 
- 
- All Implemented Interfaces:
- FacesWrapper<Flash>,- Map<String,Object>
 
 public abstract class FlashWrapper extends Flash implements FacesWrapper<Flash> Provides a simple implementation of Flashthat can be subclassed by developers wishing to provide specialized behavior to an existingFlashinstance. The default implementation of all methods is to call through to the wrappedFlash.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
 
- 
- 
Field Summary- 
Fields inherited from class jakarta.faces.context.FlashNULL_VALUE
 
- 
 - 
Constructor SummaryConstructors Constructor Description FlashWrapper()Deprecated.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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()The default behavior of this method is to callMap.clear()on the wrappedFlashobject.booleancontainsKey(Object key)The default behavior of this method is to callMap.containsKey(Object)on the wrappedFlashobject.booleancontainsValue(Object value)The default behavior of this method is to callMap.containsValue(Object)on the wrappedFlashobject.voiddoPostPhaseActions(FacesContext ctx)The default behavior of this method is to callFlash.doPostPhaseActions(FacesContext)on the wrappedFlashobject.voiddoPrePhaseActions(FacesContext ctx)The default behavior of this method is to callFlash.doPrePhaseActions(FacesContext)on the wrappedFlashobject.Set<Map.Entry<String,Object>>entrySet()The default behavior of this method is to callMap.entrySet()on the wrappedFlashobject.Objectget(Object key)The default behavior of this method is to callMap.get(Object)on the wrappedFlashobject.FlashgetWrapped()A class that implements this interface uses this method to return an instance of the class being wrapped.booleanisEmpty()The default behavior of this method is to callMap.isEmpty()on the wrappedFlashobject.booleanisKeepMessages()The default behavior of this method is to callFlash.isKeepMessages()on the wrappedFlashobject.booleanisRedirect()The default behavior of this method is to callFlash.isRedirect()on the wrappedFlashobject.voidkeep(String key)The default behavior of this method is to callFlash.keep(String)on the wrappedFlashobject.Set<String>keySet()The default behavior of this method is to callMap.keySet()on the wrappedFlashobject.Objectput(String key, Object value)The default behavior of this method is to callMap.put(K, V)on the wrappedFlashobject.voidputAll(Map<? extends String,? extends Object> m)The default behavior of this method is to callMap.putAll(Map)on the wrappedFlashobject.voidputNow(String key, Object value)The default behavior of this method is to callFlash.putNow(String, Object)on the wrappedFlashobject.Objectremove(Object key)The default behavior of this method is to callMap.remove(Object)on the wrappedFlashobject.voidsetKeepMessages(boolean newValue)The default behavior of this method is to callFlash.setKeepMessages(boolean)on the wrappedFlashobject.voidsetRedirect(boolean newValue)The default behavior of this method is to callFlash.setRedirect(boolean)on the wrappedFlashobject.intsize()The default behavior of this method is to callMap.size()on the wrappedFlashobject.Collection<Object>values()The default behavior of this method is to callMap.values()on the wrappedFlashobject.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
 
- 
 
- 
- 
- 
Constructor Detail- 
FlashWrapper@Deprecated public FlashWrapper() Deprecated.Use the other constructor taking the implementation being wrapped.
 - 
FlashWrapperpublic FlashWrapper(Flash wrapped) 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 Detail- 
getWrappedpublic Flash getWrapped() Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped. - Specified by:
- getWrappedin interface- FacesWrapper<Flash>
- Returns:
- the wrapped instance.
 
 - 
doPostPhaseActionspublic void doPostPhaseActions(FacesContext ctx) The default behavior of this method is to call Flash.doPostPhaseActions(FacesContext)on the wrappedFlashobject.- Specified by:
- doPostPhaseActionsin class- Flash
- Parameters:
- ctx- the- FacesContextfor this request.
- Since:
- 2.2
 
 - 
doPrePhaseActionspublic void doPrePhaseActions(FacesContext ctx) The default behavior of this method is to call Flash.doPrePhaseActions(FacesContext)on the wrappedFlashobject.- Specified by:
- doPrePhaseActionsin class- Flash
- Parameters:
- ctx- the- FacesContextfor this request.
- Since:
- 2.2
 
 - 
isKeepMessagespublic boolean isKeepMessages() The default behavior of this method is to call Flash.isKeepMessages()on the wrappedFlashobject.- Specified by:
- isKeepMessagesin class- Flash
- Returns:
- the boolean flag whether keeping messages or not.
- Since:
- 2.2
 
 - 
isRedirectpublic boolean isRedirect() The default behavior of this method is to call Flash.isRedirect()on the wrappedFlashobject.- Specified by:
- isRedirectin class- Flash
- Returns:
- the value of this property for the flash for this session.
- Since:
- 2.2
 
 - 
keeppublic void keep(String key) The default behavior of this method is to call Flash.keep(String)on the wrappedFlashobject.- Specified by:
- keepin class- Flash
- Parameters:
- key- if argument- keyis 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
 
 - 
putNowpublic void putNow(String key, Object value) The default behavior of this method is to call Flash.putNow(String, Object)on the wrappedFlashobject.
 - 
setKeepMessagespublic void setKeepMessages(boolean newValue) The default behavior of this method is to call Flash.setKeepMessages(boolean)on the wrappedFlashobject.- Specified by:
- setKeepMessagesin class- Flash
- Parameters:
- newValue- the new value for this property on this session.
- Since:
- 2.2
 
 - 
setRedirectpublic void setRedirect(boolean newValue) The default behavior of this method is to call Flash.setRedirect(boolean)on the wrappedFlashobject.- Specified by:
- setRedirectin class- Flash
- Parameters:
- newValue- the new value for this property on this session.
- Since:
- 2.2
 
 - 
clearpublic void clear() The default behavior of this method is to call Map.clear()on the wrappedFlashobject.
 - 
containsKeypublic boolean containsKey(Object key) The default behavior of this method is to call Map.containsKey(Object)on the wrappedFlashobject.- Specified by:
- containsKeyin interface- Map<String,Object>
- Since:
- 2.2
 
 - 
containsValuepublic boolean containsValue(Object value) The default behavior of this method is to call Map.containsValue(Object)on the wrappedFlashobject.- Specified by:
- containsValuein interface- Map<String,Object>
- Since:
- 2.2
 
 - 
entrySetpublic Set<Map.Entry<String,Object>> entrySet() The default behavior of this method is to call Map.entrySet()on the wrappedFlashobject.
 - 
getpublic Object get(Object key) The default behavior of this method is to call Map.get(Object)on the wrappedFlashobject.
 - 
isEmptypublic boolean isEmpty() The default behavior of this method is to call Map.isEmpty()on the wrappedFlashobject.
 - 
keySetpublic Set<String> keySet() The default behavior of this method is to call Map.keySet()on the wrappedFlashobject.
 - 
putpublic Object put(String key, Object value) The default behavior of this method is to call Map.put(K, V)on the wrappedFlashobject.
 - 
putAllpublic void putAll(Map<? extends String,? extends Object> m) The default behavior of this method is to call Map.putAll(Map)on the wrappedFlashobject.
 - 
removepublic Object remove(Object key) The default behavior of this method is to call Map.remove(Object)on the wrappedFlashobject.
 - 
sizepublic int size() The default behavior of this method is to call Map.size()on the wrappedFlashobject.
 - 
valuespublic Collection<Object> values() The default behavior of this method is to call Map.values()on the wrappedFlashobject.
 
- 
 
-