Package edu.indiana.lib.twinpeaks.util
Class SessionContext
- java.lang.Object
-
- edu.indiana.lib.twinpeaks.util.SessionContext
-
public class SessionContext extends Object
Expose the session context block
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(String name)Fetch a valuestatic org.sakaiproject.memory.api.CachegetCache()static SessionContextgetInstance(String id)Get a Session Context instanceintgetInt(String name)Fetch an int valuevoidput(String name, Object value)Set a name=value pairvoidputInt(String name, int value)Set a name=value pairvoidremove(String name)Delete a name=value pairstatic voidsetCache(org.sakaiproject.memory.api.Cache cache)static StringuniqueSessionName(Object parent)Construct a session-wide unique name (unique within a browser session)
-
-
-
Method Detail
-
getInstance
public static SessionContext getInstance(String id)
Get a Session Context instance
-
get
public Object get(String name)
Fetch a value- Parameters:
name- Attribute name- Returns:
- Requested value
-
put
public void put(String name, Object value)
Set a name=value pair- Parameters:
name- Attribute namevalue- Attribute value
-
getInt
public int getInt(String name)
Fetch an int value- Parameters:
name- Attribute name- Returns:
- Requested value
-
putInt
public void putInt(String name, int value)
Set a name=value pair- Parameters:
name- Attribute namevalue- Attribute value
-
remove
public void remove(String name)
Delete a name=value pair- Parameters:
name- Attribute name
-
uniqueSessionName
public static String uniqueSessionName(Object parent)
Construct a session-wide unique name (unique within a browser session)
-
getCache
public static org.sakaiproject.memory.api.Cache getCache()
- Returns:
- the cache
-
setCache
public static void setCache(org.sakaiproject.memory.api.Cache cache)
- Parameters:
cache- the cache to set
-
-