javax.faces.context
Class ExternalContextWrapper

java.lang.Object
  extended by javax.faces.context.ExternalContext
      extended by javax.faces.context.ExternalContextWrapper
All Implemented Interfaces:
FacesWrapper<ExternalContext>

public abstract class ExternalContextWrapper
extends ExternalContext
implements FacesWrapper<ExternalContext>

Since:
2.0
Version:
$Revision: 1187700 $ $Date: 2011-10-22 07:19:37 -0500 (Sat, 22 Oct 2011) $
Author:
Simon Lessard (latest modification by $Author: bommel $)

Field Summary
 
Fields inherited from class javax.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
ExternalContextWrapper()
           
 
Method Summary
 void addResponseCookie(String name, String value, Map<String,Object> properties)
           
 void addResponseHeader(String name, String value)
           
 void dispatch(String path)
           
 String encodeActionURL(String url)
           
 String encodeBookmarkableURL(String baseUrl, Map<String,List<String>> parameters)
           
 String encodeNamespace(String name)
           
 String encodePartialActionURL(String url)
           
 String encodeRedirectURL(String baseUrl, Map<String,List<String>> parameters)
           
 String encodeResourceURL(String url)
           
 Map<String,Object> getApplicationMap()
           
 String getAuthType()
           
 Object getContext()
           
 String getContextName()
          Returns the name of the underlying context
 Flash getFlash()
           
 String getInitParameter(String name)
           
 Map getInitParameterMap()
           
 String getMimeType(String file)
           
 String getRealPath(String path)
           
 String getRemoteUser()
           
 Object getRequest()
           
 String getRequestCharacterEncoding()
           
 int getRequestContentLength()
           
 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 getRequestScheme()
           
 String getRequestServerName()
           
 int getRequestServerPort()
           
 String getRequestServletPath()
           
 URL getResource(String path)
           
 InputStream getResourceAsStream(String path)
           
 Set<String> getResourcePaths(String path)
           
 Object getResponse()
           
 int getResponseBufferSize()
           
 String getResponseCharacterEncoding()
           
 String getResponseContentType()
          throws UnsupportedOperationException by default.
 OutputStream getResponseOutputStream()
           
 Writer getResponseOutputWriter()
           
 Object getSession(boolean create)
           
 Map<String,Object> getSessionMap()
           
 Principal getUserPrincipal()
           
abstract  ExternalContext getWrapped()
          A class that implements this interface uses this method to return an instance of the class being wrapped.
 void invalidateSession()
           
 boolean isResponseCommitted()
           
 boolean isUserInRole(String role)
           
 void log(String message)
           
 void log(String message, Throwable exception)
           
 void redirect(String url)
           
 void responseFlushBuffer()
           
 void responseReset()
           
 void responseSendError(int statusCode, String message)
           
 void setRequest(Object request)
          throws UnsupportedOperationException by default.
 void setRequestCharacterEncoding(String encoding)
          throws UnsupportedOperationException by default.
 void setResponse(Object response)
          throws UnsupportedOperationException by default.
 void setResponseBufferSize(int size)
           
 void setResponseCharacterEncoding(String encoding)
          throws UnsupportedOperationException by default.
 void setResponseContentLength(int length)
           
 void setResponseContentType(String contentType)
           
 void setResponseHeader(String name, String value)
           
 void setResponseStatus(int statusCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalContextWrapper

public ExternalContextWrapper()
Method Detail

addResponseCookie

public void addResponseCookie(String name,
                              String value,
                              Map<String,Object> properties)
Overrides:
addResponseCookie in class ExternalContext

addResponseHeader

public void addResponseHeader(String name,
                              String value)
Overrides:
addResponseHeader in class ExternalContext

dispatch

public void dispatch(String path)
              throws IOException
Specified by:
dispatch in class ExternalContext
Throws:
IOException

encodeActionURL

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

encodeBookmarkableURL

public String encodeBookmarkableURL(String baseUrl,
                                    Map<String,List<String>> parameters)
Overrides:
encodeBookmarkableURL in class ExternalContext

encodeNamespace

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

encodePartialActionURL

public String encodePartialActionURL(String url)
Overrides:
encodePartialActionURL in class ExternalContext

encodeRedirectURL

public String encodeRedirectURL(String baseUrl,
                                Map<String,List<String>> parameters)
Overrides:
encodeRedirectURL in class ExternalContext

encodeResourceURL

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

getApplicationMap

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

getAuthType

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

getContext

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

getContextName

public String getContextName()
Description copied from class: ExternalContext
Returns the name of the underlying context

Overrides:
getContextName in class ExternalContext
Returns:
the name or null

getFlash

public Flash getFlash()
Overrides:
getFlash in class ExternalContext

getInitParameter

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

getInitParameterMap

public Map getInitParameterMap()
Specified by:
getInitParameterMap in class ExternalContext

getMimeType

public String getMimeType(String file)
Overrides:
getMimeType in class ExternalContext

getRealPath

public String getRealPath(String path)
Overrides:
getRealPath in class ExternalContext

getRemoteUser

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

getRequest

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

getRequestCharacterEncoding

public String getRequestCharacterEncoding()
Overrides:
getRequestCharacterEncoding in class ExternalContext

getRequestContentLength

public int getRequestContentLength()
Overrides:
getRequestContentLength in class ExternalContext
Returns:

getRequestContentType

public String getRequestContentType()
Overrides:
getRequestContentType 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

getRequestScheme

public String getRequestScheme()
Overrides:
getRequestScheme in class ExternalContext

getRequestServerName

public String getRequestServerName()
Overrides:
getRequestServerName in class ExternalContext

getRequestServerPort

public int getRequestServerPort()
Overrides:
getRequestServerPort in class ExternalContext

getRequestServletPath

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

getResource

public URL getResource(String path)
                throws MalformedURLException
Specified by:
getResource in class ExternalContext
Throws:
MalformedURLException

getResourceAsStream

public InputStream getResourceAsStream(String path)
Specified by:
getResourceAsStream in class ExternalContext

getResourcePaths

public Set<String> getResourcePaths(String path)
Specified by:
getResourcePaths in class ExternalContext

getResponse

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

getResponseBufferSize

public int getResponseBufferSize()
Overrides:
getResponseBufferSize in class ExternalContext
Returns:

getResponseCharacterEncoding

public String getResponseCharacterEncoding()
Overrides:
getResponseCharacterEncoding in class ExternalContext

getResponseContentType

public String getResponseContentType()
Description copied from class: ExternalContext
throws UnsupportedOperationException by default.

Overrides:
getResponseContentType in class ExternalContext

getResponseOutputStream

public OutputStream getResponseOutputStream()
                                     throws IOException
Overrides:
getResponseOutputStream in class ExternalContext
Throws:
IOException

getResponseOutputWriter

public Writer getResponseOutputWriter()
                               throws IOException
Overrides:
getResponseOutputWriter in class ExternalContext
Throws:
IOException

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

getWrapped

public abstract ExternalContext getWrapped()
Description copied from interface: FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.

Specified by:
getWrapped in interface FacesWrapper<ExternalContext>
Returns:
the instance of the class being wrapped

invalidateSession

public void invalidateSession()
Overrides:
invalidateSession in class ExternalContext

isResponseCommitted

public boolean isResponseCommitted()
Overrides:
isResponseCommitted in class ExternalContext

isUserInRole

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

log

public void log(String message,
                Throwable exception)
Specified by:
log in class ExternalContext

log

public void log(String message)
Specified by:
log in class ExternalContext

redirect

public void redirect(String url)
              throws IOException
Specified by:
redirect in class ExternalContext
Throws:
IOException

responseFlushBuffer

public void responseFlushBuffer()
                         throws IOException
Overrides:
responseFlushBuffer in class ExternalContext
Throws:
IOException

responseReset

public void responseReset()
Overrides:
responseReset in class ExternalContext

responseSendError

public void responseSendError(int statusCode,
                              String message)
                       throws IOException
Overrides:
responseSendError in class ExternalContext
Throws:
IOException

setRequest

public void setRequest(Object request)
Description copied from class: ExternalContext
throws UnsupportedOperationException by default.

Overrides:
setRequest in class ExternalContext

setRequestCharacterEncoding

public void setRequestCharacterEncoding(String encoding)
                                 throws UnsupportedEncodingException
Description copied from class: ExternalContext
throws UnsupportedOperationException by default.

Overrides:
setRequestCharacterEncoding in class ExternalContext
Throws:
UnsupportedEncodingException

setResponse

public void setResponse(Object response)
Description copied from class: ExternalContext
throws UnsupportedOperationException by default.

Overrides:
setResponse in class ExternalContext

setResponseBufferSize

public void setResponseBufferSize(int size)
Overrides:
setResponseBufferSize in class ExternalContext

setResponseCharacterEncoding

public void setResponseCharacterEncoding(String encoding)
Description copied from class: ExternalContext
throws UnsupportedOperationException by default.

Overrides:
setResponseCharacterEncoding in class ExternalContext

setResponseContentLength

public void setResponseContentLength(int length)
Overrides:
setResponseContentLength in class ExternalContext

setResponseContentType

public void setResponseContentType(String contentType)
Overrides:
setResponseContentType in class ExternalContext

setResponseHeader

public void setResponseHeader(String name,
                              String value)
Overrides:
setResponseHeader in class ExternalContext

setResponseStatus

public void setResponseStatus(int statusCode)
Overrides:
setResponseStatus in class ExternalContext


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