org.abstracthorizon.danube.webflow
Class DanubeExternalContext.SessionMap

java.lang.Object
  extended by org.springframework.binding.collection.StringKeyedMapAdapter
      extended by org.abstracthorizon.danube.webflow.DanubeExternalContext.SessionMap
All Implemented Interfaces:
Map, org.springframework.binding.collection.SharedMap
Enclosing class:
DanubeExternalContext

public class DanubeExternalContext.SessionMap
extends org.springframework.binding.collection.StringKeyedMapAdapter
implements org.springframework.binding.collection.SharedMap

Session map adapter


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
DanubeExternalContext.SessionMap()
          Constructor
 
Method Summary
protected  Object getAttribute(String key)
          Returns session's attribute if session is available
protected  Iterator<String> getAttributeNames()
          Returns enumeration of all attribute names.
 Object getMutex()
          Returns session.
protected  Session getSession()
          Returns controller's session manager's session if there is one.
protected  void removeAttribute(String key)
          Removes attribute.
protected  void setAttribute(String key, Object value)
          Sets session attribute.
 
Methods inherited from class org.springframework.binding.collection.StringKeyedMapAdapter
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, 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
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DanubeExternalContext.SessionMap

public DanubeExternalContext.SessionMap()
Constructor

Method Detail

getSession

protected Session getSession()
Returns controller's session manager's session if there is one. null otherwise.

Returns:
controller's session manager's session

getAttribute

protected Object getAttribute(String key)
Returns session's attribute if session is available

Specified by:
getAttribute in class org.springframework.binding.collection.StringKeyedMapAdapter
Returns:
session's attribute or null if session or attribute is not available

setAttribute

protected void setAttribute(String key,
                            Object value)
Sets session attribute. If session is not already created it is going to be created now.

Specified by:
setAttribute in class org.springframework.binding.collection.StringKeyedMapAdapter
Parameters:
key - attribute key
value - attribute value

removeAttribute

protected void removeAttribute(String key)
Removes attribute. This method won't create new session if there isn't one already there

Specified by:
removeAttribute in class org.springframework.binding.collection.StringKeyedMapAdapter
Parameters:
key - attribute's key

getAttributeNames

protected Iterator<String> getAttributeNames()
Returns enumeration of all attribute names. This method won't create new session if there isn't one already there

Specified by:
getAttributeNames in class org.springframework.binding.collection.StringKeyedMapAdapter
Returns:
enumeration of all attribute names

getMutex

public Object getMutex()
Returns session. If there wasn't a session created already new one will be created when this method is called.

Specified by:
getMutex in interface org.springframework.binding.collection.SharedMap
Returns:
session


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.