org.apache.beehive.netui.pageflow.scoping
Interface ScopedRequest

All Superinterfaces:
HttpServletRequest, ServletRequest
All Known Implementing Classes:
ScopedRequestImpl

public interface ScopedRequest
extends HttpServletRequest

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
static String AUTOSCOPE_PREFIX
           
 
Fields inherited from interface HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Method Summary
 void addListenScope(Object scopeKey)
          Adds a scope to "listen" to.
 boolean didRedirect()
          Deprecated. Use ScopedResponse.didRedirect() instead.
 void doForward()
           
 Map filterParameterMap(Map parameterMap)
           
 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.
 String getForwardedURI()
           
 String getListenScopeParameter(String attrName)
           
 String getLocalParameter(String attrName)
           
 HttpServletRequest getOuterRequest()
           
 String getScopedName(String baseName)
           
 Object getScopeKey()
           
 boolean hasListenScopes()
           
 void persistAttributes()
          Stores the current map of request attributes in the Session.
 void registerOuterAttribute(String attrName)
           
 void renameScope(Object newScopeKey)
           
 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 setForwardedURI(String uri)
          Simply stores the URI that was being forwarded to.
 void setRequestURI(String uri)
           
 
Methods inherited from interface HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

AUTOSCOPE_PREFIX

static final String AUTOSCOPE_PREFIX
See Also:
Constant Field Values
Method Detail

setRequestURI

void setRequestURI(String uri)

addListenScope

void addListenScope(Object scopeKey)
Adds a scope to "listen" to. This scope will see all request parameters from a ScopedRequest of the given scope.


doForward

void doForward()

getForwardedURI

String getForwardedURI()

didRedirect

boolean didRedirect()
Deprecated. Use ScopedResponse.didRedirect() instead.


persistAttributes

void persistAttributes()
Stores the current map of request attributes in the Session.


restoreAttributes

void restoreAttributes()
Restores the map of request attributes from a map saved in the Session.


getOuterRequest

HttpServletRequest getOuterRequest()

getScopeKey

Object getScopeKey()

renameScope

void renameScope(Object newScopeKey)

setActiveRequest

void setActiveRequest()
Makes this request listen to specially-prefixed request parameters.


getScopedName

String getScopedName(String baseName)

registerOuterAttribute

void registerOuterAttribute(String attrName)

getLocalParameter

String getLocalParameter(String attrName)

getListenScopeParameter

String getListenScopeParameter(String attrName)

hasListenScopes

boolean hasListenScopes()

getAttribute

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.


filterParameterMap

Map filterParameterMap(Map parameterMap)

setForwardedURI

void setForwardedURI(String uri)
Simply stores the URI that was being forwarded to.