| 
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.context.ExternalContext
de.mindmatters.faces.context.ServletExternalContextFake
public class ServletExternalContextFake
This class allows the Faces API to be unaware of the nature of its containing application environment.
Note: documentation copied from specification
 This class implements the nature of a servlet applicaton environment. As it's
 name says this class fakes the behavior described in the specifications. This
 class implements the specified behavior which delegates to the
 ServletContext. Specified behavior which delegates to the ServletRequest or
 ServletResponse is not implemented (In fact a
 UnsupportedOperationException will be thrown).
 
This class is used on startup time to preinstantiate singletons declared in any Spring-based configuration context which needs a FacesContext for instantiation.
| Field Summary | |
|---|---|
protected  org.apache.commons.logging.Log | 
logger
For logging.  | 
| Fields inherited from class javax.faces.context.ExternalContext | 
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH | 
| Constructor Summary | |
|---|---|
ServletExternalContextFake(javax.servlet.ServletContext servletContext)
Constructs an ExternalContext with the given ServletContext servletContext. | 
|
| Method Summary | |
|---|---|
 void | 
destroy()
Invoked by a BeanFactory on destruction of a singleton.  | 
 void | 
dispatch(java.lang.String path)
 | 
 java.lang.String | 
encodeActionURL(java.lang.String url)
 | 
 java.lang.String | 
encodeNamespace(java.lang.String name)
 | 
 java.lang.String | 
encodeResourceURL(java.lang.String url)
 | 
 java.util.Map | 
getApplicationMap()
 | 
 java.lang.String | 
getAuthType()
 | 
 java.lang.Object | 
getContext()
 | 
 java.lang.String | 
getInitParameter(java.lang.String name)
 | 
 java.util.Map | 
getInitParameterMap()
 | 
 java.lang.String | 
getRemoteUser()
 | 
 java.lang.Object | 
getRequest()
 | 
 java.lang.String | 
getRequestContextPath()
 | 
 java.util.Map | 
getRequestCookieMap()
 | 
 java.util.Map | 
getRequestHeaderMap()
 | 
 java.util.Map | 
getRequestHeaderValuesMap()
 | 
 java.util.Locale | 
getRequestLocale()
 | 
 java.util.Iterator | 
getRequestLocales()
 | 
 java.util.Map | 
getRequestMap()
 | 
 java.util.Map | 
getRequestParameterMap()
 | 
 java.util.Iterator | 
getRequestParameterNames()
 | 
 java.util.Map | 
getRequestParameterValuesMap()
 | 
 java.lang.String | 
getRequestPathInfo()
 | 
 java.lang.String | 
getRequestServletPath()
 | 
 java.net.URL | 
getResource(java.lang.String path)
 | 
 java.io.InputStream | 
getResourceAsStream(java.lang.String path)
 | 
 java.util.Set | 
getResourcePaths(java.lang.String path)
 | 
 java.lang.Object | 
getResponse()
 | 
protected  javax.servlet.ServletContext | 
getServletContext()
Returns the ServletContext.  | 
 java.lang.Object | 
getSession(boolean create)
 | 
 java.util.Map | 
getSessionMap()
 | 
 java.security.Principal | 
getUserPrincipal()
 | 
 boolean | 
isUserInRole(java.lang.String role)
 | 
 void | 
log(java.lang.String message)
 | 
 void | 
log(java.lang.String message,
    java.lang.Throwable exception)
 | 
 void | 
redirect(java.lang.String url)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail | 
|---|
public ServletExternalContextFake(javax.servlet.ServletContext servletContext)
servletContext.
servletContext - the context of the application environment| Method Detail | 
|---|
public void dispatch(java.lang.String path)
              throws java.io.IOException
dispatch in class ExternalContextjava.io.IOExceptionpublic java.lang.String encodeActionURL(java.lang.String url)
encodeActionURL in class ExternalContextpublic java.lang.String encodeNamespace(java.lang.String name)
encodeNamespace in class ExternalContextpublic java.lang.String encodeResourceURL(java.lang.String url)
encodeResourceURL in class ExternalContextpublic java.util.Map getApplicationMap()
getApplicationMap in class ExternalContextpublic java.lang.String getAuthType()
getAuthType in class ExternalContextpublic java.lang.Object getContext()
getContext in class ExternalContextpublic java.lang.String getInitParameter(java.lang.String name)
getInitParameter in class ExternalContextpublic java.util.Map getInitParameterMap()
getInitParameterMap in class ExternalContextpublic java.lang.String getRemoteUser()
getRemoteUser in class ExternalContextpublic java.lang.Object getRequest()
getRequest in class ExternalContextpublic java.lang.String getRequestContextPath()
getRequestContextPath in class ExternalContextpublic java.util.Map getRequestCookieMap()
getRequestCookieMap in class ExternalContextpublic java.util.Map getRequestHeaderMap()
getRequestHeaderMap in class ExternalContextpublic java.util.Map getRequestHeaderValuesMap()
getRequestHeaderValuesMap in class ExternalContextpublic java.util.Locale getRequestLocale()
getRequestLocale in class ExternalContextpublic java.util.Iterator getRequestLocales()
getRequestLocales in class ExternalContextpublic java.util.Map getRequestMap()
getRequestMap in class ExternalContextpublic java.util.Map getRequestParameterMap()
getRequestParameterMap in class ExternalContextpublic java.util.Iterator getRequestParameterNames()
getRequestParameterNames in class ExternalContextpublic java.util.Map getRequestParameterValuesMap()
getRequestParameterValuesMap in class ExternalContextpublic java.lang.String getRequestPathInfo()
getRequestPathInfo in class ExternalContextpublic java.lang.String getRequestServletPath()
getRequestServletPath in class ExternalContext
public java.net.URL getResource(java.lang.String path)
                         throws java.net.MalformedURLException
getResource in class ExternalContextjava.net.MalformedURLExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String path)
getResourceAsStream in class ExternalContextpublic java.util.Set getResourcePaths(java.lang.String path)
getResourcePaths in class ExternalContextpublic java.lang.Object getResponse()
getResponse in class ExternalContextpublic java.lang.Object getSession(boolean create)
getSession in class ExternalContextpublic java.util.Map getSessionMap()
getSessionMap in class ExternalContextpublic java.security.Principal getUserPrincipal()
getUserPrincipal in class ExternalContextpublic boolean isUserInRole(java.lang.String role)
isUserInRole in class ExternalContextpublic void log(java.lang.String message)
log in class ExternalContext
public void log(java.lang.String message,
                java.lang.Throwable exception)
log in class ExternalContext
public void redirect(java.lang.String url)
              throws java.io.IOException
redirect in class ExternalContextjava.io.IOException
public void destroy()
             throws java.lang.Exception
destroy in interface DisposableBeanjava.lang.Exception - in case of shutdown errors.
 Exceptions will get logged but not rethrown to allow
 other beans to release their resources too.protected final javax.servlet.ServletContext getServletContext()
  | 
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||