org.inria.ns.reflex.util.wunit
Class SessionProperty

java.lang.Object
  extended by org.inria.ns.reflex.processor.PropertyResolver.Impl
      extended by org.inria.ns.reflex.util.wunit.SessionProperty
All Implemented Interfaces:
PropertyResolver

public class SessionProperty
extends PropertyResolver.Impl
implements PropertyResolver

This resolver is used to retrieve the current session or create a new session thanks to the predefined property $wunit:session.

Author:
Philippe Poulard
See Also:
HttpServletRequest.getSession(boolean)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.processor.PropertyResolver
PropertyResolver.Impl
 
Constructor Summary
SessionProperty()
           
 
Method Summary
 Object getPropertyValue(DataSet dataSet, QName propertyName)
          Get the current session, or create a new one.
 Object removeProperty(DataSet dataSet, QName propertyName)
          Invalidate the underlying session.
 
Methods inherited from class org.inria.ns.reflex.processor.PropertyResolver.Impl
setPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.processor.PropertyResolver
setPropertyValue
 

Constructor Detail

SessionProperty

public SessionProperty()
Method Detail

getPropertyValue

public Object getPropertyValue(DataSet dataSet,
                               QName propertyName)
                        throws RecoverableException
Get the current session, or create a new one.

Specified by:
getPropertyValue in interface PropertyResolver
Overrides:
getPropertyValue in class PropertyResolver.Impl
Parameters:
dataSet - The data set.
propertyName - wunit:session.
Returns:
null.
Throws:
RecoverableException - When the property cause an error.
See Also:
WUnitNames.SESSION_QNAME, PropertyResolver.getPropertyValue(org.inria.ns.reflex.processor.DataSet, org.inria.ns.reflex.xml.QName)

removeProperty

public Object removeProperty(DataSet dataSet,
                             QName propertyName)
                      throws RecoverableException
Invalidate the underlying session.

Specified by:
removeProperty in interface PropertyResolver
Overrides:
removeProperty in class PropertyResolver.Impl
Parameters:
dataSet - The data set.
propertyName - The name of this property.
Returns:
null.
Throws:
RecoverableException - When the property cause an error.
See Also:
WebNames.SESSION_QNAME, PropertyResolver.removeProperty(org.inria.ns.reflex.processor.DataSet, org.inria.ns.reflex.xml.QName)