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

All Superinterfaces:
HttpServletRequest, ServletRequest

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.
 Map getAttributeMap()
          Get the current map of request attributes.
 String getForwardedURI()
           
 String getListenScopeParameter(String attrName)
           
 String getLocalParameter(String attrName)
           
 HttpServletRequest getOuterRequest()
           
 String getScopedName(String baseName)
           
 Object getScopeKey()
           
 boolean hasListenScopes()
           
 void persistAttributes()
          Deprecated. Moved the persisting of attributes out of the beehive NetUI layer. Use getAttributeMap() to get the attributes.
 void registerOuterAttribute(String attrName)
           
 void renameScope(Object newScopeKey)
           
 void restoreAttributes()
          Deprecated. Moved the persisting of attributes out of the beehive NetUI layer. Use setAttributeMap(java.util.Map) to set/merge the attributes.
 void setActiveRequest()
          Makes this request listen to specially-prefixed request parameters.
 void setAttributeMap(Map map)
          Set/merge the map of request attributes from a map (saved in the Session).
 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()
Deprecated. Moved the persisting of attributes out of the beehive NetUI layer. Use getAttributeMap() to get the attributes.

Stores the current map of request attributes in the Session.


restoreAttributes

void restoreAttributes()
Deprecated. Moved the persisting of attributes out of the beehive NetUI layer. Use setAttributeMap(java.util.Map) to set/merge the attributes.

Restores the map of request attributes from a map saved in the Session.


getAttributeMap

Map getAttributeMap()
Get the current map of request attributes.


setAttributeMap

void setAttributeMap(Map map)
Set/merge 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.