Class SessionMap
- java.lang.Object
 - 
- org.openidentityplatform.openam.click.util.SessionMap
 
 
- 
public class SessionMap extends Object implements Map<String,Object>
Provides a Map adaptor for HttpSession objects. A SessionMap instance is available in each Velocity page using the name "session". For example suppose we have a User object in the session with the attribute name "user" when a user is logged on. We can display the users name in the page when the are logged onto the system.#if ($session.user) $session.user.fullname you are logged on. #else You are not logged on. #end
The ClickServlet adds a SessionMap instance to the Velocity Context before it is merged with the page template. The SessionMap supportsFlashAttributewhich when accessed viaget(Object)are removed from the session. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected jakarta.servlet.http.HttpSessionsessionThe internal session attribute. 
- 
Constructor Summary
Constructors Constructor Description SessionMap(jakarta.servlet.http.HttpSession value)Create a HttpSession Map adaptor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)This method is not supported and will throw UnsupportedOperationException if invoked.Set<Map.Entry<String,Object>>entrySet()Objectget(Object key)If the stored object is a FlashObject this method will return the FlashObject value and then remove it from the session.booleanisEmpty()Set<String>keySet()Objectput(String key, Object value)voidputAll(Map<? extends String,?> map)Objectremove(Object key)intsize()Collection<Object>values()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll 
 - 
 
 - 
 
- 
- 
Method Detail
- 
size
public int size()
- Specified by:
 sizein interfaceMap<String,Object>- See Also:
 Map.size()
 
- 
isEmpty
public boolean isEmpty()
- Specified by:
 isEmptyin interfaceMap<String,Object>- See Also:
 Map.isEmpty()
 
- 
containsKey
public boolean containsKey(Object key)
- Specified by:
 containsKeyin interfaceMap<String,Object>- See Also:
 Map.containsKey(Object)
 
- 
containsValue
public boolean containsValue(Object value)
This method is not supported and will throw UnsupportedOperationException if invoked.- Specified by:
 containsValuein interfaceMap<String,Object>- See Also:
 Map.containsValue(Object)
 
- 
get
public Object get(Object key)
If the stored object is a FlashObject this method will return the FlashObject value and then remove it from the session.- Specified by:
 getin interfaceMap<String,Object>- See Also:
 Map.get(Object)
 
- 
put
public Object put(String key, Object value)
- Specified by:
 putin interfaceMap<String,Object>- See Also:
 Map.put(Object, Object)
 
- 
remove
public Object remove(Object key)
- Specified by:
 removein interfaceMap<String,Object>- See Also:
 Map.remove(Object)
 
- 
putAll
public void putAll(Map<? extends String,?> map)
- Specified by:
 putAllin interfaceMap<String,Object>- See Also:
 Map.putAll(Map)
 
- 
clear
public void clear()
- Specified by:
 clearin interfaceMap<String,Object>- See Also:
 Map.clear()
 
- 
keySet
public Set<String> keySet()
- Specified by:
 keySetin interfaceMap<String,Object>- See Also:
 Map.keySet()
 
- 
values
public Collection<Object> values()
- Specified by:
 valuesin interfaceMap<String,Object>- See Also:
 Map.values()
 
 - 
 
 -