public class ScopedMap extends HashMap<String,Serializable>
Used to store context data and invalidate some data given its scope. Implements Map for easier use from interface.
ScopeType
,
Serialized FormAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ScopedMap() |
Modifier and Type | Method and Description |
---|---|
void |
clearScope(ScopeType scopeType)
Removes all mappings for given scope.
|
Map<String,Serializable> |
getDefaultScopeValues()
Creates a Map with entries from DEFAULT scope.
|
Serializable |
getScopedValue(ScopeType scope,
String key)
Gets value for given scope and given key.
|
Serializable |
getScopedValue(String key)
Gets value for given key using default scope.
|
Map<String,Serializable> |
getScopeValues(ScopeType scopeType)
Creates a Map with entries from specified scope.
|
void |
putScopedValue(ScopeType scope,
String key,
Serializable value)
Sets value for given scope and given key.
|
void |
putScopedValue(String key,
Serializable value)
Sets key using default scope.
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
public Serializable getScopedValue(ScopeType scope, String key)
public Serializable getScopedValue(String key)
public Map<String,Serializable> getDefaultScopeValues()
public Map<String,Serializable> getScopeValues(ScopeType scopeType)
public void putScopedValue(ScopeType scope, String key, Serializable value)
public void putScopedValue(String key, Serializable value)
public void clearScope(ScopeType scopeType)
Copyright © 2011 Nuxeo SA. All Rights Reserved.