org.sakaiproject.component.adaptor
Class UsageSessionServiceAdaptor.SessionStateWrapper

java.lang.Object
  extended byorg.sakaiproject.component.adaptor.UsageSessionServiceAdaptor.SessionStateWrapper
All Implemented Interfaces:
Map, SessionState
Enclosing class:
UsageSessionServiceAdaptor

public class UsageSessionServiceAdaptor.SessionStateWrapper
extends Object
implements SessionState

SessionState


Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
protected  ToolSession m_session
          The ToolSession object wrapped.
 
Constructor Summary
UsageSessionServiceAdaptor.SessionStateWrapper(ToolSession session)
           
 
Method Summary
protected  void bindAttributeValue(String attributeName, Object attribute)
          If the object is a SessionStateBindingListener, bind it
 void clear()
          Remove all attributes.
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 Object get(Object key)
           
 Object getAttribute(String name)
          Access the named attribute.
 List getAttributeNames()
          Access a List of all names of attributes stored in the SessionState.
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 Object removeAttribute(String name)
          Remove the named attribute, if it exists.
 Object setAttribute(String name, Object value)
          Set the named attribute value to the provided object.
 int size()
           
protected  void unBindAttributeValue(String attributeName, Object attribute)
          If the object is a SessionStateBindingListener, unbind it
 Collection 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
equals, hashCode
 

Field Detail

m_session

protected ToolSession m_session
The ToolSession object wrapped.

Constructor Detail

UsageSessionServiceAdaptor.SessionStateWrapper

public UsageSessionServiceAdaptor.SessionStateWrapper(ToolSession session)
Method Detail

getAttribute

public Object getAttribute(String name)
Description copied from interface: SessionState
Access the named attribute.

Specified by:
getAttribute in interface SessionState
Parameters:
name - The attribute name.
Returns:
The named attribute value.

setAttribute

public Object setAttribute(String name,
                           Object value)
Description copied from interface: SessionState
Set the named attribute value to the provided object.

Specified by:
setAttribute in interface SessionState
Parameters:
name - The attribute name.
value - The value of the attribute (any object type).
Returns:
The previous value of the named attribute (or null if no previous value).

removeAttribute

public Object removeAttribute(String name)
Description copied from interface: SessionState
Remove the named attribute, if it exists.

Specified by:
removeAttribute in interface SessionState
Parameters:
name - The attribute name.
Returns:
The previous value of the removed named attribute (or null if no previous value).

clear

public void clear()
Description copied from interface: SessionState
Remove all attributes.

Specified by:
clear in interface SessionState

getAttributeNames

public List getAttributeNames()
Description copied from interface: SessionState
Access a List of all names of attributes stored in the SessionState.

Specified by:
getAttributeNames in interface SessionState
Returns:
A List of all names of attribute stored in the SessionState.

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

unBindAttributeValue

protected void unBindAttributeValue(String attributeName,
                                    Object attribute)
If the object is a SessionStateBindingListener, unbind it

Parameters:
attributeName - The attribute name.
attribute - The attribute object

bindAttributeValue

protected void bindAttributeValue(String attributeName,
                                  Object attribute)
If the object is a SessionStateBindingListener, bind it

Parameters:
attributeName - The attribute name.
attribute - The attribute object