org.abstracthorizon.danube.tapestry
Class DanubeSession

java.lang.Object
  extended by org.abstracthorizon.danube.tapestry.DanubeSession
All Implemented Interfaces:
Describable, AttributeHolder, WebSession

public class DanubeSession
extends Object
implements WebSession

WebSession interface implementation

Author:
Daniel Sendula

Field Summary
protected  boolean isNew
          Flag to denote if the session is new
protected  Session session
          Danube's session
static String SESSION_ATTRIBUTE
          Attribute in session this object is going to be stored
 
Constructor Summary
DanubeSession(Session session)
          Constructor
 
Method Summary
protected  void clearNew()
          Clears isNew flag.
 void describeTo(DescriptionReceiver descriptionReceiver)
          Does nothing
 Object getAttribute(String key)
          Returns attribute
 List getAttributeNames()
          Returns attributes names as a list
 String getId()
          Returns session id
 void invalidate()
          Invalidates session.
 boolean isNew()
          Returns true if session is newly created
 void setAttribute(String key, Object value)
          Sets attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ATTRIBUTE

public static final String SESSION_ATTRIBUTE
Attribute in session this object is going to be stored

See Also:
Constant Field Values

session

protected Session session
Danube's session


isNew

protected boolean isNew
Flag to denote if the session is new

Constructor Detail

DanubeSession

public DanubeSession(Session session)
Constructor

Parameters:
session - danube's session
Method Detail

getId

public String getId()
Returns session id

Specified by:
getId in interface WebSession
Returns:
session id

isNew

public boolean isNew()
Returns true if session is newly created

Specified by:
isNew in interface WebSession
Returns:
true if session is newly created

clearNew

protected void clearNew()
Clears isNew flag.


invalidate

public void invalidate()
Invalidates session. It removes this object from danube's session.

Specified by:
invalidate in interface WebSession

getAttributeNames

public List getAttributeNames()
Returns attributes names as a list

Specified by:
getAttributeNames in interface AttributeHolder
Returns:
attributes names as a list

getAttribute

public Object getAttribute(String key)
Returns attribute

Specified by:
getAttribute in interface AttributeHolder
Parameters:
key - attribute name
Returns:
attribute's value

setAttribute

public void setAttribute(String key,
                         Object value)
Sets attribute

Specified by:
setAttribute in interface AttributeHolder
Parameters:
key - attribute's name
value - attribute's value

describeTo

public void describeTo(DescriptionReceiver descriptionReceiver)
Does nothing

Specified by:
describeTo in interface Describable


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