|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils
public class ScopedServletUtils
Utilities for creating scoped wrapper versions of HttpRequest, HttpResponse, ServletContext. These wrappers are the basis for a scoped servlet environment, which can be used to scope the Struts framework.
Field Summary | |
---|---|
static String |
SCOPE_ID_PARAM
|
Constructor Summary | |
---|---|
ScopedServletUtils()
|
Method Summary | |
---|---|
static javax.servlet.http.HttpServletRequest |
getOuterRequest(javax.servlet.http.HttpServletRequest request)
Get the outer (unwrapped) request. |
static javax.servlet.ServletRequest |
getOuterServletRequest(javax.servlet.ServletRequest request)
Get the outer (unwrapped) request. |
static String |
getRelativeURI(javax.servlet.http.HttpServletRequest request)
Get the request URI, relative to the webapp root. |
static String |
getRelativeURI(javax.servlet.http.HttpServletRequest request,
String uri)
Get a URI relative to the webapp root. |
static String |
getRelativeURI(String contextPath,
String uri)
Get a URI relative to a given webapp root. |
static String |
getScopedName(String baseName,
Object scopeKey)
Get a scoped version of a given name. |
static ScopedRequest |
getScopedRequest(javax.servlet.http.HttpServletRequest realRequest,
String overrideURI,
javax.servlet.ServletContext servletContext,
Object scopeKey)
Deprecated Use getScopedRequest(HttpServletRequest, String, ServletContext, Object, boolean) . |
static ScopedRequest |
getScopedRequest(javax.servlet.http.HttpServletRequest realRequest,
String overrideURI,
javax.servlet.ServletContext servletContext,
Object scopeKey,
boolean seeOuterRequestAttributes)
Get the cached ScopedRequest wrapper. |
static ScopedResponse |
getScopedResponse(javax.servlet.http.HttpServletResponse realResponse,
ScopedRequest scopedRequest)
Get the cached wrapper servlet response. |
static void |
renameScope(Object oldScopeKey,
Object newScopeKey,
javax.servlet.http.HttpServletRequest request)
Find all scoped objects ( ScopedRequest , ScopedResponse )
which have a certain scope-key, replaces this scope-key with the new one,
and re-caches the objects the new scope-key. |
static ScopedResponse |
updateScopedResponse(javax.servlet.http.HttpServletResponse realResponse,
ScopedRequest scopedRequest)
Updates the cached wrapper servlet response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SCOPE_ID_PARAM
Constructor Detail |
---|
public ScopedServletUtils()
Method Detail |
---|
public static ScopedRequest getScopedRequest(javax.servlet.http.HttpServletRequest realRequest, String overrideURI, javax.servlet.ServletContext servletContext, Object scopeKey)
getScopedRequest(HttpServletRequest, String, ServletContext, Object, boolean)
.
realRequest
- the "real" (outer) HttpServletRequest, which will be wrapped.overrideURI
- the request-URI for the wrapped object. This URI must begin with the context path.servletContext
- the current ServletContext.scopeKey
- the scope-key associated with the new (or looked-up) scoped request.
public static ScopedRequest getScopedRequest(javax.servlet.http.HttpServletRequest realRequest, String overrideURI, javax.servlet.ServletContext servletContext, Object scopeKey, boolean seeOuterRequestAttributes)
realRequest
- the "real" (outer) HttpServletRequest, which will be wrapped.overrideURI
- the request-URI for the wrapped object. This URI must begin with the context path.servletContext
- the current ServletContext.scopeKey
- the scope-key associated with the new (or looked-up) scoped request.seeOuterRequestAttributes
- if true
, a request attribute will be "seen" in the outer request,
if it is not found within the scoped request; if false
, attributes are only seen when
they are present in the scoped request.
public static ScopedResponse getScopedResponse(javax.servlet.http.HttpServletResponse realResponse, ScopedRequest scopedRequest)
realResponse
- the "real" (outer) ServletResponse, which will be wrapped.scopedRequest
- the ScopedRequest returned from getScopedRequest(javax.servlet.http.HttpServletRequest, java.lang.String, javax.servlet.ServletContext, java.lang.Object)
.
public static ScopedResponse updateScopedResponse(javax.servlet.http.HttpServletResponse realResponse, ScopedRequest scopedRequest)
realResponse
- the "real" (outer) ServletResponse, which will be wrapped.scopedRequest
- the ScopedRequest returned from getScopedRequest(javax.servlet.http.HttpServletRequest, java.lang.String, javax.servlet.ServletContext, java.lang.Object)
.
public static void renameScope(Object oldScopeKey, Object newScopeKey, javax.servlet.http.HttpServletRequest request)
ScopedRequest
, ScopedResponse
)
which have a certain scope-key, replaces this scope-key with the new one,
and re-caches the objects the new scope-key.
oldScopeKey
- newScopeKey
- request
- the real (outer) request, where the scoped objects are cached.public static String getScopedName(String baseName, Object scopeKey)
baseName
- the name to be scoped.scopeKey
- the context key for scoping the name.
public static javax.servlet.http.HttpServletRequest getOuterRequest(javax.servlet.http.HttpServletRequest request)
request
- the request to unwrap.
public static javax.servlet.ServletRequest getOuterServletRequest(javax.servlet.ServletRequest request)
request
- the request to unwrap.
public static final String getRelativeURI(javax.servlet.http.HttpServletRequest request)
request
- the current HttpServletRequest.public static final String getRelativeURI(javax.servlet.http.HttpServletRequest request, String uri)
request
- the current HttpServletRequest.uri
- the URI which should be made relative.public static final String getRelativeURI(String contextPath, String uri)
contextPath
- the webapp context path, e.g., "/myWebapp"uri
- the URI which should be made relative.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |