org.apache.myfaces.context.servlet
Class StartupServletExternalContextImpl

java.lang.Object
  extended by javax.faces.context.ExternalContext
      extended by org.apache.myfaces.context.servlet.ServletExternalContextImplBase
          extended by org.apache.myfaces.context.servlet.StartupServletExternalContextImpl
All Implemented Interfaces:
ReleaseableExternalContext

public class StartupServletExternalContextImpl
extends ServletExternalContextImplBase

An ExternalContext implementation for Servlet environments, which is used by StartupFacesContextImpl at container startup and shutdown and which provides ExternalContext functionality that does not require request and response objects.

Version:
$Revision: 957581 $ $Date: 2010-06-24 10:22:24 -0500 (Jue, 24 Jun 2010) $
Author:
Jakob Korherr (latest modification by $Author: lu4242 $)

Field Summary
static String EXCEPTION_TEXT
           
 
Fields inherited from class javax.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
StartupServletExternalContextImpl(javax.servlet.ServletContext servletContext, boolean startup)
           
 
Method Summary
 void dispatch(String path)
          Cannot dispatch because this is not a page request
 String encodeActionURL(String url)
           
 String encodeNamespace(String name)
           
 String encodeResourceURL(String url)
           
 String getAuthType()
           
 String getRemoteUser()
           
 Object getRequest()
           
 String getRequestCharacterEncoding()
           
 String getRequestContentType()
           
 String getRequestContextPath()
           
 Map<String,Object> getRequestCookieMap()
           
 Map<String,String> getRequestHeaderMap()
           
 Map<String,String[]> getRequestHeaderValuesMap()
           
 Locale getRequestLocale()
           
 Iterator<Locale> getRequestLocales()
           
 Map<String,Object> getRequestMap()
           
 Map<String,String> getRequestParameterMap()
           
 Iterator<String> getRequestParameterNames()
           
 Map<String,String[]> getRequestParameterValuesMap()
           
 String getRequestPathInfo()
           
 String getRequestServletPath()
           
 Object getResponse()
           
 String getResponseCharacterEncoding()
           
 String getResponseContentType()
           
 Object getSession(boolean create)
           
 Map<String,Object> getSessionMap()
           
 Principal getUserPrincipal()
           
 boolean isUserInRole(String role)
           
 void redirect(String url)
          Cannot redirect because this is not a page request
 void setRequest(Object request)
           
 void setRequestCharacterEncoding(String encoding)
           
 void setResponse(Object response)
           
 void setResponseCharacterEncoding(String encoding)
           
 
Methods inherited from class org.apache.myfaces.context.servlet.ServletExternalContextImplBase
checkNull, getApplicationMap, getContext, getInitParameter, getInitParameterMap, getResource, getResourceAsStream, getResourcePaths, log, log, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCEPTION_TEXT

public static final String EXCEPTION_TEXT
See Also:
Constant Field Values
Constructor Detail

StartupServletExternalContextImpl

public StartupServletExternalContextImpl(javax.servlet.ServletContext servletContext,
                                         boolean startup)
Method Detail

encodeActionURL

public String encodeActionURL(String url)
Specified by:
encodeActionURL in class ExternalContext

encodeNamespace

public String encodeNamespace(String name)
Specified by:
encodeNamespace in class ExternalContext

encodeResourceURL

public String encodeResourceURL(String url)
Specified by:
encodeResourceURL in class ExternalContext

getAuthType

public String getAuthType()
Specified by:
getAuthType in class ExternalContext

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in class ExternalContext

getRequest

public Object getRequest()
Specified by:
getRequest in class ExternalContext

getRequestContextPath

public String getRequestContextPath()
Specified by:
getRequestContextPath in class ExternalContext

getRequestCookieMap

public Map<String,Object> getRequestCookieMap()
Specified by:
getRequestCookieMap in class ExternalContext

getRequestHeaderMap

public Map<String,String> getRequestHeaderMap()
Specified by:
getRequestHeaderMap in class ExternalContext

getRequestHeaderValuesMap

public Map<String,String[]> getRequestHeaderValuesMap()
Specified by:
getRequestHeaderValuesMap in class ExternalContext

getRequestLocale

public Locale getRequestLocale()
Specified by:
getRequestLocale in class ExternalContext

getRequestLocales

public Iterator<Locale> getRequestLocales()
Specified by:
getRequestLocales in class ExternalContext

getRequestMap

public Map<String,Object> getRequestMap()
Specified by:
getRequestMap in class ExternalContext

getRequestParameterMap

public Map<String,String> getRequestParameterMap()
Specified by:
getRequestParameterMap in class ExternalContext

getRequestParameterNames

public Iterator<String> getRequestParameterNames()
Specified by:
getRequestParameterNames in class ExternalContext

getRequestParameterValuesMap

public Map<String,String[]> getRequestParameterValuesMap()
Specified by:
getRequestParameterValuesMap in class ExternalContext

getRequestPathInfo

public String getRequestPathInfo()
Specified by:
getRequestPathInfo in class ExternalContext

getRequestServletPath

public String getRequestServletPath()
Specified by:
getRequestServletPath in class ExternalContext

getResponse

public Object getResponse()
Specified by:
getResponse in class ExternalContext

getSession

public Object getSession(boolean create)
Specified by:
getSession in class ExternalContext

getSessionMap

public Map<String,Object> getSessionMap()
Specified by:
getSessionMap in class ExternalContext

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in class ExternalContext

isUserInRole

public boolean isUserInRole(String role)
Specified by:
isUserInRole in class ExternalContext

getRequestCharacterEncoding

public String getRequestCharacterEncoding()
Overrides:
getRequestCharacterEncoding in class ExternalContext

getRequestContentType

public String getRequestContentType()
Overrides:
getRequestContentType in class ExternalContext

getResponseCharacterEncoding

public String getResponseCharacterEncoding()
Overrides:
getResponseCharacterEncoding in class ExternalContext

getResponseContentType

public String getResponseContentType()
Overrides:
getResponseContentType in class ExternalContext

setRequest

public void setRequest(Object request)
Overrides:
setRequest in class ExternalContext

setRequestCharacterEncoding

public void setRequestCharacterEncoding(String encoding)
                                 throws UnsupportedEncodingException
Overrides:
setRequestCharacterEncoding in class ExternalContext
Throws:
UnsupportedEncodingException

setResponse

public void setResponse(Object response)
Overrides:
setResponse in class ExternalContext

setResponseCharacterEncoding

public void setResponseCharacterEncoding(String encoding)
Overrides:
setResponseCharacterEncoding in class ExternalContext

dispatch

public void dispatch(String path)
              throws IOException
Cannot dispatch because this is not a page request

Specified by:
dispatch in class ExternalContext
Throws:
IOException

redirect

public void redirect(String url)
              throws IOException
Cannot redirect because this is not a page request

Specified by:
redirect in class ExternalContext
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.