Class SessionContext


  • public class SessionContext
    extends Object
    Expose the session context block
    • 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 name
        value - 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 name
        value - 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