|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.context.ExternalContext
This class allows the Faces API to be unaware of the nature of its containing environment. For example, this class allows Faces to run in either a Servlet or a Portlet. This class can be seen as an extension of FacesContext.
| Constructor Summary | |
ExternalContext()
|
|
| Method Summary | |
abstract void |
dispatchMessage(java.lang.String requestURI)
Dispatch a request to the apropriate context. |
abstract java.lang.String |
encodeActionURL(java.lang.String sb)
Force any URL that causes an action to work within a portal/portlet. |
abstract java.lang.String |
encodeNamespace(java.lang.String aValue)
PENDING(edburns): this does nothing for Servlets. |
abstract java.lang.String |
encodeResourceURL(java.lang.String sb)
Force any URL that references a resource to work within a portal/portlet. |
abstract java.lang.String |
encodeURL(java.lang.String url)
A wrapper for ServletResponse.encodeURL(). |
abstract java.util.Map |
getApplicationMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletContext for this request and calling
getAttribute(key) on it. |
abstract java.lang.Object |
getContext()
|
abstract java.lang.String |
getInitParameter(java.lang.String name)
A wrapper for ServletContext.getInitParameter(). |
abstract java.util.Map |
getInitParameterMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletContext for this request and calling
getInitParam(key) on it. |
abstract java.lang.Object |
getRequest()
|
abstract java.lang.String |
getRequestContextPath()
A wrapper for HttpServletRequest.getContextPath(). |
abstract java.util.Map |
getRequestCookieMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and looking through
the Cookie[] returned by calling
getCookies() and finding a cookie with the name of
key. |
abstract Cookie[] |
getRequestCookies()
A wrapper for HttpServletRequest.getCookies(). |
abstract java.util.Map |
getRequestHeaderMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getHeader(key) on it. |
abstract java.util.Map |
getRequestHeaderValuesMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getHeaders(key) on it. |
abstract java.util.Locale |
getRequestLocale()
A wrapper for ServletRequest.getLocale(). |
abstract java.util.Map |
getRequestMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getAttribute(key) on it. |
abstract java.util.Map |
getRequestParameterMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getParameter(key) on it. |
abstract java.util.Iterator |
getRequestParameterNames()
This is simply a wrapper for ServletRequest.getParameterNames(). |
abstract java.util.Map |
getRequestParameterValuesMap()
Similar to getRequestParameterMap, but useful for those
parameters that can have multiple values with one key. |
abstract java.lang.String |
getRequestPathInfo()
A wrapper for ServletRequest.getPathInfo(). |
abstract java.io.InputStream |
getResourceAsStream(java.lang.String path)
A wrapper for ServletContext.getResourceAsStream(). |
abstract java.util.Set |
getResourcePaths(java.lang.String path)
A wrapper for ServletContext.getResourcePaths(). |
abstract java.lang.Object |
getResponse()
|
abstract java.lang.Object |
getSession(boolean create)
|
abstract java.util.Map |
getSessionMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
HttpSession for this request and calling
getAttribute(key) on it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExternalContext()
| Method Detail |
public abstract java.lang.Object getSession(boolean create)
create - true - to create a new session for this request if
necessary; false to return null if there's no current session
HttpSession instance for the session
associated with the current request (if any); otherwise, return
null.public abstract java.lang.Object getContext()
ServletContext object for the web
application associated with this request.public abstract java.lang.Object getRequest()
ServletRequest object representing the
current request that is being processed.public abstract java.lang.Object getResponse()
ServletResponse object representing the
current response that is being rendered.public abstract java.util.Map getApplicationMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletContext for this request and calling
getAttribute(key) on it. Similar rules apply for
other Map methods where they make sense.
Map that wraps the ServletContext's
attribute set.public abstract java.util.Map getSessionMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
HttpSession for this request and calling
getAttribute(key) on it. Similar rules apply for *
other Map methods where they make sense.
Map that wraps the HttpSession's
attribute set.public abstract java.util.Map getRequestMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getAttribute(key) on it. Similar rules apply for *
other Map methods where they make sense.
Map that wraps the Request's
attribute set.public abstract java.util.Map getRequestParameterMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getParameter(key) on it. Similar rules apply for
other Map methods where they make sense.
Map of all the parameters sent with this request.public abstract java.util.Map getRequestParameterValuesMap()
Similar to getRequestParameterMap, but useful for those
parameters that can have multiple values with one key.
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getParameterValues(key) on it. Similar rules apply
for other Map methods where they make sense.
Map that wraps the getParameterValues()
result set.public abstract java.util.Iterator getRequestParameterNames()
ServletRequest.getParameterNames(). We took the
liberty of returning an Iterator instead of an
Enumeration.
public abstract java.util.Map getRequestHeaderMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getHeader(key) on it. Similar rules apply for
other Map methods where they make sense.
Map that wraps the Header set for this
request.public abstract java.util.Map getRequestHeaderValuesMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and calling
getHeaders(key) on it. Similar rules apply for
other Map methods where they make sense.
Map that wraps the Header set for this
request, but calls getHeaders() instead of
getHeader().public abstract java.util.Map getRequestCookieMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletRequest for this request and looking through
the Cookie[] returned by calling
getCookies() and finding a cookie with the name of
key. Similar rules apply for other Map methods where
they make sense.
Map that wraps the Cookie set for this
request.public abstract java.util.Locale getRequestLocale()
A wrapper for ServletRequest.getLocale().
public abstract java.lang.String getRequestPathInfo()
A wrapper for ServletRequest.getPathInfo().
public abstract java.lang.String getRequestContextPath()
A wrapper for HttpServletRequest.getContextPath().
public abstract Cookie[] getRequestCookies()
A wrapper for HttpServletRequest.getCookies().
public abstract java.lang.String getInitParameter(java.lang.String name)
A wrapper for ServletContext.getInitParameter().
public abstract java.util.Map getInitParameterMap()
Calling get(key) on the Map obtained
from this method is equivalent to getting the
ServletContext for this request and calling
getInitParam(key) on it. Similar rules apply for
other Map methods where they make sense.
Map that wraps the ServletContext's
init parameter set.public abstract java.util.Set getResourcePaths(java.lang.String path)
A wrapper for ServletContext.getResourcePaths().
public abstract java.io.InputStream getResourceAsStream(java.lang.String path)
A wrapper for ServletContext.getResourceAsStream().
public abstract java.lang.String encodeActionURL(java.lang.String sb)
Force any URL that causes an action to work within a portal/portlet. This causes the URL to have the required redirection for the specific portal to be included
sb - The input URL to be reformattedpublic abstract java.lang.String encodeResourceURL(java.lang.String sb)
Force any URL that references a resource to work within a portal/portlet. This causes the URL to have the required redirection for the specific portal to be included. In reality, it simply returns an absolute URL.
sb - The input URL to be reformattedpublic abstract java.lang.String encodeNamespace(java.lang.String aValue)
public abstract java.lang.String encodeURL(java.lang.String url)
A wrapper for ServletResponse.encodeURL().
public abstract void dispatchMessage(java.lang.String requestURI)
throws java.io.IOException,
FacesException
Dispatch a request to the apropriate context. In the case of servlets, this is done via "forward", but for portlets, it must use "include".
requestURI - The input URI of the request tree.
java.io.IOException
FacesException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||