Spring Security Framework

org.springframework.security.ui.savedrequest
Class SavedRequest

java.lang.Object
  extended by org.springframework.security.ui.savedrequest.SavedRequest
All Implemented Interfaces:
Serializable

public class SavedRequest
extends Object
implements Serializable

Represents central information from a HttpServletRequest.

This class is used by AbstractProcessingFilter and SavedRequestAwareWrapper to reproduce the request after successful authentication. An instance of this class is stored at the time of an authentication exception by ExceptionTranslationFilter.

IMPLEMENTATION NOTE: It is assumed that this object is accessed only from the context of a single thread, so no synchronization around internal collection classes is performed.

This class is based on code in Apache Tomcat.

Version:
$Id$
Author:
Craig McClanahan, Andrey Grebnev, Ben Alex
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log logger
           
 
Constructor Summary
SavedRequest(HttpServletRequest request, PortResolver portResolver)
           
 
Method Summary
 boolean doesRequestMatch(HttpServletRequest request, PortResolver portResolver)
          Determines if the current request matches the SavedRequest.
 String getContextPath()
           
 List getCookies()
           
 String getFullRequestUrl()
          Indicates the URL that the user agent used for this request.
 Iterator getHeaderNames()
           
 Iterator getHeaderValues(String name)
           
 Iterator getLocales()
           
 String getMethod()
           
 Map getParameterMap()
           
 Iterator getParameterNames()
           
 String[] getParameterValues(String name)
           
 String getPathInfo()
           
 String getQueryString()
           
 String getRequestURI()
           
 String getRequestUrl()
          Obtains the web application-specific fragment of the URL.
 String getRequestURL()
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 String getServletPath()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger
Constructor Detail

SavedRequest

public SavedRequest(HttpServletRequest request,
                    PortResolver portResolver)
Method Detail

doesRequestMatch

public boolean doesRequestMatch(HttpServletRequest request,
                                PortResolver portResolver)
Determines if the current request matches the SavedRequest. All URL arguments are considered, but not method (POST/GET), cookies, locales, headers or parameters.

Parameters:
request - DOCUMENT ME!
portResolver - DOCUMENT ME!
Returns:
DOCUMENT ME!

getContextPath

public String getContextPath()

getCookies

public List getCookies()

getFullRequestUrl

public String getFullRequestUrl()
Indicates the URL that the user agent used for this request.

Returns:
the full URL of this request

getHeaderNames

public Iterator getHeaderNames()

getHeaderValues

public Iterator getHeaderValues(String name)

getLocales

public Iterator getLocales()

getMethod

public String getMethod()

getParameterMap

public Map getParameterMap()

getParameterNames

public Iterator getParameterNames()

getParameterValues

public String[] getParameterValues(String name)

getPathInfo

public String getPathInfo()

getQueryString

public String getQueryString()

getRequestURI

public String getRequestURI()

getRequestURL

public String getRequestURL()

getRequestUrl

public String getRequestUrl()
Obtains the web application-specific fragment of the URL.

Returns:
the URL, excluding any server name, context path or servlet path

getScheme

public String getScheme()

getServerName

public String getServerName()

getServerPort

public int getServerPort()

getServletPath

public String getServletPath()

toString

public String toString()
Overrides:
toString in class Object

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.