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

All Superinterfaces
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest
All Known Implementing Classes:
ScopedRequestImpl

public interface ScopedRequest
extends javax.servlet.http.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 javax.servlet.http.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()
           
 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)
           
 List getNamesOfRemovableAttributes()
          Returns names of attributes that do not need to be saved in a session or restored later for a follow up refresh request.
 javax.servlet.http.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 javax.servlet.http.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 javax.servlet.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
Constants Summary
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).


getNamesOfRemovableAttributes

List getNamesOfRemovableAttributes()
Returns names of attributes that do not need to be saved in a session or restored later for a follow up refresh request. They are not required for the refresh request. Use this to optimize the set of request attributes that may be stored in a user session and later restored as attributes for a refresh request.

Returns
a list of names of attribute that do not need to be persisted in the user session.

getOuterRequest

javax.servlet.http.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.


setForwardedURI

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



Copyright © 2011, Oracle. All rights reserved.