org.sakaiproject.tool.OSIDRepository
Class SessionContext

java.lang.Object
  extended byorg.sakaiproject.tool.OSIDRepository.SessionContext
All Implemented Interfaces:
SessionContextInterface

public class SessionContext
extends Object
implements SessionContextInterface

Expose the servlet-level session context block


Field Summary
static String CONTEXTNAME
          Name of the stored SessionContext object
 
Method Summary
 Object get(String name)
          Fetch a value
static SessionContext getInstance(HttpSession session)
          Get a Session Context object instance
 HttpSession getSession()
          Get the servlet session block associated with this SessionContext
 void put(String name, Object value)
          Set a name=value pair
 void remove(String name)
          Delete a name=value pair
 String uniqueName(Object parent)
          Construct a unique name
static String uniqueSessionName(Object parent)
          Construct a session-wide unique name (unique within a browser session)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXTNAME

public static final String CONTEXTNAME
Name of the stored SessionContext object

See Also:
Constant Field Values
Method Detail

getInstance

public static SessionContext getInstance(HttpSession session)
Get a Session Context object instance

Parameters:
session - HttpSession object

put

public void put(String name,
                Object value)
Set a name=value pair

Specified by:
put in interface SessionContextInterface
Parameters:
name - Attribute name
value - Attribute value

get

public Object get(String name)
Fetch a value

Specified by:
get in interface SessionContextInterface
Parameters:
name - Attribute name
Returns:
Requested value

remove

public void remove(String name)
Delete a name=value pair

Specified by:
remove in interface SessionContextInterface
Parameters:
name - Attribute name

getSession

public HttpSession getSession()
Get the servlet session block associated with this SessionContext

Specified by:
getSession in interface SessionContextInterface
Returns:
HttpServlet object for the SessionContext

uniqueSessionName

public static String uniqueSessionName(Object parent)
Construct a session-wide unique name (unique within a browser session)


uniqueName

public String uniqueName(Object parent)
Construct a unique name