net.nplus1.anduril.web
Class RequestContext

java.lang.Object
  extended bynet.nplus1.anduril.web.RequestContext

public class RequestContext
extends java.lang.Object

Utility class that transforms the request object into a UI independent context. The goal is to separate incoming request from the protocol specific into protocol independent context.


Constructor Summary
RequestContext()
          Default constructor to initialize the context
 
Method Summary
 java.lang.Object getAttribute(java.lang.String key)
          Returns the requested attribute.
 java.util.Set getKeySet()
          Returns the set of keys for the requested attributes.
 java.lang.Object getSessionAttribute(java.lang.String key)
          Returns the requested session attribute.
 java.util.Set getSessionKeySet()
          Returns the set of keys for the session attributes.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Used to set attributes of the context.
 void setParameter(java.lang.String key, java.lang.Object value)
          Used to set parameters of the context.
 void setSessionAttribute(java.lang.String key, java.lang.Object value)
          Used to set sesion level attributes of the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestContext

public RequestContext()
Default constructor to initialize the context

Method Detail

setParameter

public void setParameter(java.lang.String key,
                         java.lang.Object value)
Used to set parameters of the context. Parameters are data revieved by the incoming request

Parameters:
key - the key to associate with the value
value - the data to store as a parameter

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Used to set attributes of the context. Attributes are associated with the incoming request.

Parameters:
key - the key to associate with the value
value - the data to store as an attribute

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Returns the requested attribute.

Parameters:
key - to look up data stored as an attribute
Returns:
Object the value associated with the key

getKeySet

public java.util.Set getKeySet()
Returns the set of keys for the requested attributes.

Returns:
Set the keys associated with reqeusted attributes

setSessionAttribute

public void setSessionAttribute(java.lang.String key,
                                java.lang.Object value)
Used to set sesion level attributes of the context. Attributes are associated with the users session with the server.

Parameters:
key - the key to associate with the value
value - the data to store as a session attribute

getSessionAttribute

public java.lang.Object getSessionAttribute(java.lang.String key)
Returns the requested session attribute.

Parameters:
key - to look up data stored as an attribute
Returns:
Object the value associated with the key

getSessionKeySet

public java.util.Set getSessionKeySet()
Returns the set of keys for the session attributes.

Returns:
Set the keys associated with session attributes