|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectServletRequestWrapper
HttpServletRequestWrapper
ScopedRequestImpl
public class ScopedRequestImpl
A wrapper around HttpServletRequest, associated with a given scope-key. All calls to setAttribute, getAttribute, removeAttribute, etc. are scoped to this object, while most other functionality delegates to the wrapped HttpServletRequest. Instances of this class also keep track of their own request-URIs, which are independent of the wrapped request-URIs.
| Field Summary |
|---|
| Fields inherited from interface ScopedRequest |
|---|
AUTOSCOPE_PREFIX |
| Fields inherited from interface HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
ScopedRequestImpl(HttpServletRequest req,
String overrideRequestURI,
Object scopeKey,
ServletContext context)
Deprecated. Use ScopedRequestImpl(HttpServletRequest, String, Object, ServletContext, boolean). |
|
ScopedRequestImpl(HttpServletRequest req,
String overrideRequestURI,
Object scopeKey,
ServletContext servletContext,
boolean seeOuterRequestAttributes)
|
|
| Method Summary | |
|---|---|
void |
addListenScope(Object scopeKey)
Adds a scope to "listen" to. |
void |
addParameter(String name,
String value)
Add a parameter to the request. |
boolean |
didRedirect()
Deprecated. Use ScopedResponseImpl.didRedirect() instead. |
void |
doForward()
|
Map |
filterParameterMap(Map parameterMap)
|
Object |
getAttribute(String attrName)
|
Object |
getAttribute(String attrName,
boolean allowOuterRequestAttributes)
Same as getAttribute, but allows outer request attributes to be hidden explicitly, even if the implementation
of getAttribute shows them by default. |
Enumeration |
getAttributeNames()
|
String |
getForwardedURI()
|
String |
getListenScopeParameter(String paramName)
Get the parameter from the listen scoped requests |
String |
getLocalParameter(String paramName)
Get the parameter from the scoped request only (don't check in listen scoped requests) |
HttpServletRequest |
getOuterRequest()
|
String |
getParameter(String paramName)
|
Map |
getParameterMap()
|
Enumeration |
getParameterNames()
|
String[] |
getParameterValues(String paramName)
|
String |
getPathInfo()
|
RequestDispatcher |
getRequestDispatcher(String uri)
|
String |
getRequestedSessionId()
|
String |
getRequestURI()
|
StringBuffer |
getRequestURL()
|
String |
getScopedName(String baseName)
|
Object |
getScopeKey()
|
String |
getServletPath()
|
boolean |
hasListenScopes()
see if this scoped request is listening to any other scoped request |
void |
persistAttributes()
Stores the current map of request attributes in the Session. |
void |
registerOuterAttribute(String attrName)
|
void |
removeAttribute(String attrName)
|
void |
renameScope(Object newScopeKey)
|
static void |
renameSessionScope(Object oldScopeKey,
Object newScopeKey,
HttpServletRequest outerRequest)
|
void |
restoreAttributes()
Restores the map of request attributes from a map saved in the Session. |
void |
setActiveRequest()
Makes this request listen to specially-prefixed request parameters. |
void |
setAttribute(String attrName,
Object o)
|
void |
setForwardedURI(String uri)
Simply stores the URI that was being forwarded to. |
void |
setPathInfo(String pathInfo)
|
void |
setRequestURI(String uri)
|
void |
setRequestURI(String contextPath,
String servletPath)
|
| Methods inherited from class HttpServletRequestWrapper |
|---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathTranslated, getQueryString, getRemoteUser, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
| Methods inherited from class ServletRequestWrapper |
|---|
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding, setRequest |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface HttpServletRequest |
|---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathTranslated, getQueryString, getRemoteUser, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
| Methods inherited from interface ServletRequest |
|---|
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding |
| Constructor Detail |
|---|
public ScopedRequestImpl(HttpServletRequest req,
String overrideRequestURI,
Object scopeKey,
ServletContext servletContext,
boolean seeOuterRequestAttributes)
public ScopedRequestImpl(HttpServletRequest req,
String overrideRequestURI,
Object scopeKey,
ServletContext context)
ScopedRequestImpl(HttpServletRequest, String, Object, ServletContext, boolean).
| Method Detail |
|---|
public String getRequestedSessionId()
getRequestedSessionId in interface HttpServletRequestgetRequestedSessionId in class HttpServletRequestWrapperpublic String getRequestURI()
getRequestURI in interface HttpServletRequestgetRequestURI in class HttpServletRequestWrapperpublic void setRequestURI(String uri)
setRequestURI in interface ScopedRequest
public void setRequestURI(String contextPath,
String servletPath)
public StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestgetRequestURL in class HttpServletRequestWrapperpublic String getServletPath()
getServletPath in interface HttpServletRequestgetServletPath in class HttpServletRequestWrapperpublic String getParameter(String paramName)
getParameter in interface ServletRequestgetParameter in class ServletRequestWrapper
public void addParameter(String name,
String value)
name - the parameter name.value - the parameter value.public String getLocalParameter(String paramName)
getLocalParameter in interface ScopedRequestparamName -
public String getListenScopeParameter(String paramName)
getListenScopeParameter in interface ScopedRequestparamName -
public Enumeration getParameterNames()
getParameterNames in interface ServletRequestgetParameterNames in class ServletRequestWrapperpublic String[] getParameterValues(String paramName)
getParameterValues in interface ServletRequestgetParameterValues in class ServletRequestWrapperpublic Map getParameterMap()
getParameterMap in interface ServletRequestgetParameterMap in class ServletRequestWrapperpublic Map filterParameterMap(Map parameterMap)
filterParameterMap in interface ScopedRequestpublic void addListenScope(Object scopeKey)
addListenScope in interface ScopedRequestpublic RequestDispatcher getRequestDispatcher(String uri)
getRequestDispatcher in interface ServletRequestgetRequestDispatcher in class ServletRequestWrapperpublic void doForward()
doForward in interface ScopedRequestpublic void setForwardedURI(String uri)
setForwardedURI in interface ScopedRequesturi - public String getForwardedURI()
getForwardedURI in interface ScopedRequestpublic boolean didRedirect()
ScopedResponseImpl.didRedirect() instead.
didRedirect in interface ScopedRequestpublic void persistAttributes()
persistAttributes in interface ScopedRequestpublic void restoreAttributes()
restoreAttributes in interface ScopedRequestpublic final HttpServletRequest getOuterRequest()
getOuterRequest in interface ScopedRequestpublic final Object getAttribute(String attrName)
getAttribute in interface ServletRequestgetAttribute in class ServletRequestWrapper
public final Object getAttribute(String attrName,
boolean allowOuterRequestAttributes)
ScopedRequestgetAttribute, but allows outer request attributes to be hidden explicitly, even if the implementation
of getAttribute shows them by default.
getAttribute in interface ScopedRequest
public final void setAttribute(String attrName,
Object o)
setAttribute in interface ServletRequestsetAttribute in class ServletRequestWrapperpublic final Enumeration getAttributeNames()
getAttributeNames in interface ServletRequestgetAttributeNames in class ServletRequestWrapperpublic final void removeAttribute(String attrName)
removeAttribute in interface ServletRequestremoveAttribute in class ServletRequestWrapperpublic void registerOuterAttribute(String attrName)
registerOuterAttribute in interface ScopedRequestpublic final Object getScopeKey()
getScopeKey in interface ScopedRequestpublic void renameScope(Object newScopeKey)
renameScope in interface ScopedRequest
public static void renameSessionScope(Object oldScopeKey,
Object newScopeKey,
HttpServletRequest outerRequest)
public String getPathInfo()
getPathInfo in interface HttpServletRequestgetPathInfo in class HttpServletRequestWrapperpublic void setPathInfo(String pathInfo)
public void setActiveRequest()
setActiveRequest in interface ScopedRequestpublic final String getScopedName(String baseName)
getScopedName in interface ScopedRequestpublic boolean hasListenScopes()
hasListenScopes in interface ScopedRequest
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||