Class ActivityDataMap

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>
    Direct Known Subclasses:
    TemplateDataMap

    public class ActivityDataMap
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    A map of data for saving activity results. It is often used as a model for providing data used in views.

    This class is generally not thread-safe. It is primarily designed for use in a single thread only.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • 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
      ActivityDataMap​(Activity activity)
      Instantiates a new ActivityDataMap.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()  
      java.lang.Object get​(java.lang.Object key)  
      java.lang.Object getActionResultWithoutCache​(java.lang.String name)
      Returns the value of the named action's process result without storing it in the cache.
      protected Activity getActivity()  
      java.lang.Object getAttributeWithoutCache​(java.lang.String name)
      Returns the value of the named attribute from the request adapter without storing it in the cache.
      java.lang.Object getParameterWithoutCache​(java.lang.String name)
      Returns the value of the request parameter from the request adapter without storing it in the cache.
      java.lang.Object getSessionAttributeWithoutCache​(java.lang.String name)
      Returns the value of the named attribute from the session adapter without storing it in the cache.
      java.lang.Object put​(java.lang.String key, java.lang.Object value)  
      void refresh()  
      java.util.Collection<java.lang.Object> values()  
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
    • Constructor Detail

      • ActivityDataMap

        public ActivityDataMap​(Activity activity)
        Instantiates a new ActivityDataMap.
        Parameters:
        activity - the activity
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        get in class java.util.HashMap<java.lang.String,​java.lang.Object>
      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.Object value)
        Specified by:
        put in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        put in class java.util.HashMap<java.lang.String,​java.lang.Object>
      • values

        @NonNull
        public java.util.Collection<java.lang.Object> values()
        Specified by:
        values in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        values in class java.util.HashMap<java.lang.String,​java.lang.Object>
      • entrySet

        @NonNull
        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        entrySet in class java.util.HashMap<java.lang.String,​java.lang.Object>
      • getParameterWithoutCache

        public java.lang.Object getParameterWithoutCache​(java.lang.String name)
        Returns the value of the request parameter from the request adapter without storing it in the cache. If the parameter does not exist, returns null.
        Parameters:
        name - a String specifying the name of the parameter
        Returns:
        an Object containing the value of the parameter, or null if the parameter does not exist
        See Also:
        RequestAdapter.setParameter(java.lang.String, java.lang.String)
      • getAttributeWithoutCache

        public java.lang.Object getAttributeWithoutCache​(java.lang.String name)
        Returns the value of the named attribute from the request adapter without storing it in the cache. If no attribute of the given name exists, returns null.
        Parameters:
        name - a String specifying the name of the attribute
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist
        See Also:
        RequestAdapter.getAttribute(java.lang.String)
      • getActionResultWithoutCache

        public java.lang.Object getActionResultWithoutCache​(java.lang.String name)
        Returns the value of the named action's process result without storing it in the cache. If no process result of the given name exists, returns null.
        Parameters:
        name - a String specifying the name of the action
        Returns:
        an Object containing the value of the action result, or null if the action result does not exist
      • getSessionAttributeWithoutCache

        public java.lang.Object getSessionAttributeWithoutCache​(java.lang.String name)
        Returns the value of the named attribute from the session adapter without storing it in the cache. If no attribute of the given name exists, returns null.
        Parameters:
        name - a String specifying the name of the attribute
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist
        See Also:
        SessionAdapter.getAttribute(java.lang.String)
      • refresh

        public void refresh()
      • getActivity

        protected Activity getActivity()