Package com.aspectran.core.activity
Class ActivityDataMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.lang.Object>
-
- com.aspectran.core.activity.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
-
-
Constructor Summary
Constructors Constructor Description ActivityDataMap(Activity activity)
Instantiates a new ActivityDataMap.
-
Method Summary
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
-
-
-
-
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 interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
get
in classjava.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 interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
put
in classjava.util.HashMap<java.lang.String,java.lang.Object>
-
values
public java.util.Collection<java.lang.Object> values()
- Specified by:
values
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
values
in classjava.util.HashMap<java.lang.String,java.lang.Object>
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
- Specified by:
entrySet
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
entrySet
in classjava.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
- aString
specifying the name of the parameter- Returns:
- an
Object
containing the value of the parameter, ornull
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
- aString
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
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
- aString
specifying the name of the action- Returns:
- an
Object
containing the value of the action result, ornull
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
- aString
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
if the attribute does not exist - See Also:
SessionAdapter.getAttribute(java.lang.String)
-
refresh
public void refresh()
-
getActivity
protected Activity getActivity()
-
-