org.vraptor.scope
Class DefaultRequestContext

java.lang.Object
  extended by org.vraptor.scope.DefaultRequestContext
All Implemented Interfaces:
Context, RequestContext

public class DefaultRequestContext
extends Object
implements RequestContext

A simple request context.

Author:
Guilherme Silveira

Constructor Summary
DefaultRequestContext(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 Object getAttribute(String name)
          Retrieves an attribute
 Map<String,Object> getAttributeMap()
           
 Map<String,Object> getParameterMap()
           
 boolean hasAttribute(String name)
          Whether it contains an attribute
 Object removeAttribute(String name)
          Removes an attribute
 void setAttribute(String name, Object value)
          Sets an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRequestContext

public DefaultRequestContext(javax.servlet.http.HttpServletRequest request)
Method Detail

hasAttribute

public boolean hasAttribute(String name)
Description copied from interface: Context
Whether it contains an attribute

Specified by:
hasAttribute in interface Context
Parameters:
name - name
Returns:
true if contained

setAttribute

public void setAttribute(String name,
                         Object value)
Description copied from interface: Context
Sets an attribute. Optional operation.

Specified by:
setAttribute in interface Context
Parameters:
name - name
value - value

getAttribute

public Object getAttribute(String name)
Description copied from interface: Context
Retrieves an attribute

Specified by:
getAttribute in interface Context
Parameters:
name - name
Returns:
value or null if not found

removeAttribute

public Object removeAttribute(String name)
Description copied from interface: Context
Removes an attribute

Specified by:
removeAttribute in interface Context
Parameters:
name - name
Returns:
value

getParameterMap

public Map<String,Object> getParameterMap()
Specified by:
getParameterMap in interface RequestContext

getAttributeMap

public Map<String,Object> getAttributeMap()
Specified by:
getAttributeMap in interface RequestContext


Copyright © 2004-2008 VRaptor. All Rights Reserved.