Class FlashWrapper

  • All Implemented Interfaces:
    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 push the implementation being wrapped to the constructor and use getWrapped() to access the instance being wrapped.

    Since:
    2.2
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear​()
      The default behavior of this method is to call Map.clear() on the wrapped Flash object.
      boolean containsKey​(java.lang.Object key)
      The default behavior of this method is to call Map.containsKey(Object) on the wrapped Flash object.
      boolean containsValue​(java.lang.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.
      java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet​()
      The default behavior of this method is to call Map.entrySet() on the wrapped Flash object.
      java.lang.Object get​(java.lang.Object key)
      The default behavior of this method is to call Map.get(Object) on the wrapped Flash object.
      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​(java.lang.String key)
      The default behavior of this method is to call Flash.keep(String) on the wrapped Flash object.
      java.util.Set<java.lang.String> keySet​()
      The default behavior of this method is to call Map.keySet() on the wrapped Flash object.
      java.lang.Object put​(java.lang.String key, java.lang.Object value)
      The default behavior of this method is to call Map.put(K, V) on the wrapped Flash object.
      void putAll​(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)
      The default behavior of this method is to call Map.putAll(Map) on the wrapped Flash object.
      void putNow​(java.lang.String key, java.lang.Object value)
      The default behavior of this method is to call Flash.putNow(String, Object) on the wrapped Flash object.
      java.lang.Object remove​(java.lang.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.
      java.util.Collection<java.lang.Object> values​()
      The default behavior of this method is to call Map.values() on the wrapped Flash object.
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, entry, equals, forEach, getOrDefault, hashCode, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, putIfAbsent, remove, replace, replace, replaceAll
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlashWrapper

        @Deprecated
        public FlashWrapper​()
        Deprecated. Use the other constructor taking the implementation being wrapped.
      • FlashWrapper

        public 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

      • getWrapped

        public 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>
        Returns:
        the wrapped instance.
      • 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
        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 wrapped Flash object.

        Specified by:
        isRedirect in class Flash
        Returns:
        the value of this property for the flash for this session.
        Since:
        2.2
      • keep

        public void keep​(java.lang.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​(java.lang.String key,
                           java.lang.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.

        Since:
        2.2
      • containsKey

        public boolean containsKey​(java.lang.Object key)

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

        Since:
        2.2
      • containsValue

        public boolean containsValue​(java.lang.Object value)

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

        Since:
        2.2
      • entrySet

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

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

        Since:
        2.2
      • get

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

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

        Since:
        2.2
      • isEmpty

        public boolean isEmpty​()

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

        Since:
        2.2
      • keySet

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

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

        Since:
        2.2
      • put

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

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

        Since:
        2.2
      • putAll

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

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

        Since:
        2.2
      • remove

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

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

        Since:
        2.2
      • size

        public int size​()

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

        Since:
        2.2
      • values

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

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

        Since:
        2.2