net.sourceforge.scopes.util
Class ScopesRequestUtils

java.lang.Object
  extended by net.sourceforge.scopes.util.ScopesRequestUtils

public class ScopesRequestUtils
extends java.lang.Object

Utilities to use Scopes with HttpServletRequest.


Method Summary
static java.lang.String getCookieAttributeFromRequest(javax.servlet.http.HttpServletRequest request, java.lang.String attributeName)
          Returns the value of a cookie attribute, if found.
static State getState(javax.servlet.ServletRequest request)
          It returns a state that was previously stored.
static void setState(javax.servlet.ServletRequest request, State state)
          Stores a state inside a request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getState

public static State getState(javax.servlet.ServletRequest request)
It returns a state that was previously stored.

Parameters:
request - The request from which the state should be extracted.
Returns:
The extracted state.

setState

public static void setState(javax.servlet.ServletRequest request,
                            State state)
Stores a state inside a request.

Parameters:
request - The request to store the state into.
state - The state to store.

getCookieAttributeFromRequest

public static java.lang.String getCookieAttributeFromRequest(javax.servlet.http.HttpServletRequest request,
                                                             java.lang.String attributeName)
Returns the value of a cookie attribute, if found.

Parameters:
request - The HTTP request.
attributeName - The name of the cookie attribute.
Returns:
The attribute value if found, otherwise null.