|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1) E10686-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.share.Environment oracle.adf.share.http.ServletEnvironment
public class ServletEnvironment
Constructor Summary | |
---|---|
ServletEnvironment(javax.servlet.ServletContext servletContext,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
|
Method Summary | |
---|---|
void |
clearCachedLocale()
If the enviroment caches the locale, it should implement this method to clear the cached locale value. |
void |
dispatch(java.lang.String requestURI)
Dispatch a request to the specified resource to create output for this response. |
java.lang.String |
encodeResourceURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable resource in the current application. |
java.lang.Object |
getContext()
Return the application environment object instance for the current appication. |
java.lang.Object |
getRequest()
Return the environment-specific object instance for the current request. |
java.lang.String |
getRequestCharacterEncoding()
|
java.lang.String |
getRequestContextPath()
Return the portion of the request URI that identifies the web application context for this request. |
java.util.Locale |
getRequestLocale()
Return the preferred Locale in which the client
will accept content. |
java.util.Map |
getRequestParameterMap()
|
java.lang.String |
getRequestPathInfo()
Return the extra path information (if any) included in the request URI; otherwise, return null . |
java.lang.String |
getRequestQueryString()
|
java.lang.String |
getRequestServletPath()
Return the servlet path information (if any) included in the request URI; otherwise, return null . |
java.lang.String |
getRequestURI()
|
java.lang.Object |
getResponse()
Return the environment-specific object instance for the current response. |
void |
redirect(java.lang.String url)
Redirect a request to the specified URL, and cause the responseComplete() method to be called on the
FacesContext instance for the current request. |
void |
setRequestCharacterEncoding(java.lang.String encoding)
|
Methods inherited from class oracle.adf.share.Environment |
---|
getContextObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServletEnvironment(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
Method Detail |
---|
public java.lang.Object getRequest()
Environment
Return the environment-specific object instance for the current request.
Servlet: This must be the current request's
javax.servlet.http.HttpServletRequest
instance.
Portlet: This must be the current request's
javax.portlet.PortletRequest
instance, which
will be either an ActionRequest
or a
RenderRequest
depending upon when this method
is called.
getRequest
in class Environment
public java.lang.Object getResponse()
Environment
Return the environment-specific object instance for the current response.
Servlet: This is the current request's
javax.servlet.http.HttpServletResponse
instance.
Portlet: This is the current request's
javax.portlet.PortletResponse
instance, which
will be either an ActionResponse
or a
RenderResponse
depending upon when this method
is called.
getResponse
in class Environment
public java.lang.Object getContext()
Environment
Return the application environment object instance for the current appication.
Servlet: This must be the current application's
javax.servlet.ServletContext
instance.
Portlet: This must be the current application's
javax.portlet.PortletContext
instance.
getContext
in class Environment
public java.util.Locale getRequestLocale()
Environment
Return the preferred Locale
in which the client
will accept content.
Servlet: This must be the value returned by the
javax.servlet.ServletRequest
method
getLocale()
.
Portlet: This must be the value returned by the
javax.portlet.PortletRequest
method
getLocale()
.
getRequestLocale
in class Environment
public void clearCachedLocale()
Environment
clearCachedLocale
in class Environment
public java.lang.String getRequestServletPath()
Environment
Return the servlet path information (if any) included in the
request URI; otherwise, return null
.
Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getServletPath()
.
Portlet: This must be null
.
getRequestServletPath
in class Environment
public java.lang.String getRequestPathInfo()
Environment
Return the extra path information (if any) included in the
request URI; otherwise, return null
.
Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getPathInfo()
.
Portlet: This must be null
.
getRequestPathInfo
in class Environment
public java.lang.String encodeResourceURL(java.lang.String url)
Environment
Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable resource in the current application.
Servlet: This must be the value returned by the
javax.servlet.http.HttpServletResponse
method
encodeURL(url)
.
Portlet: This must be the value returned by the
javax.portlet.PortletResponse
method
encodeURL(url)
.
encodeResourceURL
in class Environment
url
- The input URL to be encodedpublic void redirect(java.lang.String url) throws java.io.IOException
Environment
Redirect a request to the specified URL, and cause the
responseComplete()
method to be called on the
FacesContext
instance for the current request.
Servlet: This must be accomplished by calling the
javax.servlet.http.HttpServletResponse
method
sendRedirect()
.
Portlet: This must be accomplished by calling the
javax.portlet.ActionResponse
method
sendRedirect()
.
redirect
in class Environment
url
- Absolute URL to which the client should be redirected
java.io.IOException
- if an input/output error occurspublic java.lang.String getRequestContextPath()
Environment
Return the portion of the request URI that identifies the web application context for this request.
Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getContextPath()
.
Portlet: This must be the value returned by the
javax.portlet.PortletRequest
method
getContextPath()
.
getRequestContextPath
in class Environment
public java.lang.String getRequestURI()
getRequestURI
in class Environment
public java.lang.String getRequestQueryString()
getRequestQueryString
in class Environment
public java.lang.String getRequestCharacterEncoding()
getRequestCharacterEncoding
in class Environment
public void setRequestCharacterEncoding(java.lang.String encoding) throws java.io.IOException
setRequestCharacterEncoding
in class Environment
java.io.IOException
public java.util.Map getRequestParameterMap()
getRequestParameterMap
in class Environment
public void dispatch(java.lang.String requestURI) throws java.io.IOException
Environment
Dispatch a request to the specified resource to create output for this response.
Servlet: This must be accomplished by calling the
javax.servlet.ServletContext
method
getRequestDispatcher(path)
, and calling the
forward()
method on the resulting object.
Portlet: This must be accomplished by calling the
javax.portlet.PortletContext
method
getRequestDispatcher()
, and calling the
include()
method on the resulting object.
dispatch
in class Environment
requestURI
- Context relative path to the specified resource,
which must start with a slash ("/") character
java.io.IOException
- if an input/output error occurs
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1) E10686-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |