Class ActivityData

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.aspectran.core.activity.ActivityData
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>
Direct Known Subclasses:
TemplateModel

public class ActivityData extends HashMap<String,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:
  • Constructor Details

    • ActivityData

      public ActivityData(Activity activity)
      Instantiates a new ActivityData.
      Parameters:
      activity - the activity
  • Method Details

    • get

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

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

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

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

      public Object getParameterWithoutCache(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:
    • getAttributeWithoutCache

      public Object getAttributeWithoutCache(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:
    • getActionResultWithoutCache

      public Object getActionResultWithoutCache(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 Object getSessionAttributeWithoutCache(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:
    • refresh

      public void refresh()
    • getActivity

      protected Activity getActivity()