|
|||||||||
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 HttpServletRequest
getRequestedSessionId
in class HttpServletRequestWrapper
public String getRequestURI()
getRequestURI
in interface HttpServletRequest
getRequestURI
in class HttpServletRequestWrapper
public void setRequestURI(String uri)
setRequestURI
in interface ScopedRequest
public void setRequestURI(String contextPath, String servletPath)
public StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
getRequestURL
in class HttpServletRequestWrapper
public String getServletPath()
getServletPath
in interface HttpServletRequest
getServletPath
in class HttpServletRequestWrapper
public String getParameter(String paramName)
getParameter
in interface ServletRequest
getParameter
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 ScopedRequest
paramName
-
public String getListenScopeParameter(String paramName)
getListenScopeParameter
in interface ScopedRequest
paramName
-
public Enumeration getParameterNames()
getParameterNames
in interface ServletRequest
getParameterNames
in class ServletRequestWrapper
public String[] getParameterValues(String paramName)
getParameterValues
in interface ServletRequest
getParameterValues
in class ServletRequestWrapper
public Map getParameterMap()
getParameterMap
in interface ServletRequest
getParameterMap
in class ServletRequestWrapper
public Map filterParameterMap(Map parameterMap)
filterParameterMap
in interface ScopedRequest
public void addListenScope(Object scopeKey)
addListenScope
in interface ScopedRequest
public RequestDispatcher getRequestDispatcher(String uri)
getRequestDispatcher
in interface ServletRequest
getRequestDispatcher
in class ServletRequestWrapper
public void doForward()
doForward
in interface ScopedRequest
public void setForwardedURI(String uri)
setForwardedURI
in interface ScopedRequest
uri
- public String getForwardedURI()
getForwardedURI
in interface ScopedRequest
public boolean didRedirect()
ScopedResponseImpl.didRedirect()
instead.
didRedirect
in interface ScopedRequest
public void persistAttributes()
persistAttributes
in interface ScopedRequest
public void restoreAttributes()
restoreAttributes
in interface ScopedRequest
public final HttpServletRequest getOuterRequest()
getOuterRequest
in interface ScopedRequest
public final Object getAttribute(String attrName)
getAttribute
in interface ServletRequest
getAttribute
in class ServletRequestWrapper
public final Object getAttribute(String attrName, boolean allowOuterRequestAttributes)
ScopedRequest
getAttribute
, 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 ServletRequest
setAttribute
in class ServletRequestWrapper
public final Enumeration getAttributeNames()
getAttributeNames
in interface ServletRequest
getAttributeNames
in class ServletRequestWrapper
public final void removeAttribute(String attrName)
removeAttribute
in interface ServletRequest
removeAttribute
in class ServletRequestWrapper
public void registerOuterAttribute(String attrName)
registerOuterAttribute
in interface ScopedRequest
public final Object getScopeKey()
getScopeKey
in interface ScopedRequest
public void renameScope(Object newScopeKey)
renameScope
in interface ScopedRequest
public static void renameSessionScope(Object oldScopeKey, Object newScopeKey, HttpServletRequest outerRequest)
public String getPathInfo()
getPathInfo
in interface HttpServletRequest
getPathInfo
in class HttpServletRequestWrapper
public void setPathInfo(String pathInfo)
public void setActiveRequest()
setActiveRequest
in interface ScopedRequest
public final String getScopedName(String baseName)
getScopedName
in interface ScopedRequest
public boolean hasListenScopes()
hasListenScopes
in interface ScopedRequest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |