Class ExternalContextWrapper
- java.lang.Object
-
- jakarta.faces.context.ExternalContext
-
- jakarta.faces.context.ExternalContextWrapper
-
- All Implemented Interfaces:
FacesWrapper<ExternalContext>
public abstract class ExternalContextWrapper extends ExternalContext implements FacesWrapper<ExternalContext>
Provides a simple implementation of
ExternalContext
that can be subclassed by developers wishing to provide specialized behavior to an existingExternalContext
instance. The default implementation of all methods is to call through to the wrappedExternalContext
instance.Usage: extend this class and push the implementation being wrapped to the constructor and use
getWrapped()
to access the instance being wrapped.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class jakarta.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
-
Constructor Summary
Constructors Constructor Description ExternalContextWrapper()
Deprecated.Use the other constructor taking the implementation being wrapped.ExternalContextWrapper(ExternalContext wrapped)
If this external context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResponseCookie(String name, String value, Map<String,Object> properties)
The default behavior of this method is to callExternalContext.addResponseCookie(String, String, Map)
on the wrappedExternalContext
object.void
addResponseHeader(String name, String value)
The default behavior of this method is to callExternalContext.addResponseHeader(String,String)
on the wrappedExternalContext
object.void
dispatch(String path)
The default behavior of this method is to callExternalContext.dispatch(String)
on the wrappedExternalContext
object.String
encodeActionURL(String url)
The default behavior of this method is to callExternalContext.encodeActionURL(String)
on the wrappedExternalContext
object.String
encodeBookmarkableURL(String baseUrl, Map<String,List<String>> parameters)
The default behavior of this method is to callExternalContext.encodeBookmarkableURL(String, java.util.Map)
on the wrappedExternalContext
object.String
encodeNamespace(String name)
The default behavior of this method is to callExternalContext.encodeNamespace(String)
on the wrappedExternalContext
object.String
encodePartialActionURL(String url)
The default behavior of this method is to callExternalContext.encodePartialActionURL(String)
on the wrappedExternalContext
object.String
encodeRedirectURL(String baseUrl, Map<String,List<String>> parameters)
The default behavior of this method is to callExternalContext.encodeRedirectURL(String, java.util.Map)
on the wrappedExternalContext
object.String
encodeResourceURL(String url)
The default behavior of this method is to callExternalContext.encodeResourceURL(String)
on the wrappedExternalContext
object.String
encodeWebsocketURL(String url)
The default behavior of this method is to callExternalContext.encodeWebsocketURL(String)
on the wrappedExternalContext
object.String
getApplicationContextPath()
The default behavior of this method is to callExternalContext.getApplicationContextPath()
on the wrappedExternalContext
object.Map<String,Object>
getApplicationMap()
The default behavior of this method is to callExternalContext.getApplicationMap()
on the wrappedExternalContext
object.String
getAuthType()
The default behavior of this method is to callExternalContext.getAuthType()
on the wrappedExternalContext
object.ClientWindow
getClientWindow()
The default behavior of this method is to callExternalContext.getClientWindow()
on the wrappedExternalContext
object.Object
getContext()
The default behavior of this method is to callExternalContext.getContext()
on the wrappedExternalContext
object.String
getContextName()
The default behavior of this method is to callExternalContext.getContextName()
on the wrappedExternalContext
object.Flash
getFlash()
The default behavior of this method is to callExternalContext.getFlash()
on the wrappedExternalContext
object.String
getInitParameter(String name)
The default behavior of this method is to callExternalContext.getInitParameter(String)
on the wrappedExternalContext
object.Map
getInitParameterMap()
The default behavior of this method is to callExternalContext.getInitParameterMap()
on the wrappedExternalContext
object.String
getMimeType(String file)
The default behavior of this method is to callExternalContext.getMimeType(String)
on the wrappedExternalContext
object.String
getRealPath(String path)
The default behavior of this method is to callExternalContext.getRealPath(String)
on the wrappedExternalContext
object.String
getRemoteUser()
The default behavior of this method is to callExternalContext.getRemoteUser()
on the wrappedExternalContext
object.Object
getRequest()
The default behavior of this method is to callExternalContext.getRequest()
on the wrappedExternalContext
object.String
getRequestCharacterEncoding()
The default behavior of this method is to callExternalContext.getRequestCharacterEncoding()
on the wrappedExternalContext
object.int
getRequestContentLength()
The default behavior of this method is to callExternalContext.getRequestContentLength()
on the wrappedExternalContext
object.String
getRequestContentType()
The default behavior of this method is to callExternalContext.getRequestContentType()
on the wrappedExternalContext
object.String
getRequestContextPath()
The default behavior of this method is to callExternalContext.getRequestContextPath()
on the wrappedExternalContext
object.Map<String,Object>
getRequestCookieMap()
The default behavior of this method is to callExternalContext.getRequestCookieMap()
on the wrappedExternalContext
object.Map<String,String>
getRequestHeaderMap()
The default behavior of this method is to callExternalContext.getRequestHeaderMap()
on the wrappedExternalContext
object.Map<String,String[]>
getRequestHeaderValuesMap()
The default behavior of this method is to callExternalContext.getRequestHeaderValuesMap()
on the wrappedExternalContext
object.Locale
getRequestLocale()
The default behavior of this method is to callExternalContext.getRequestLocale()
on the wrappedExternalContext
object.Iterator<Locale>
getRequestLocales()
The default behavior of this method is to callExternalContext.getRequestLocales()
on the wrappedExternalContext
object.Map<String,Object>
getRequestMap()
The default behavior of this method is to callExternalContext.getRequestMap()
on the wrappedExternalContext
object.Map<String,String>
getRequestParameterMap()
The default behavior of this method is to callExternalContext.getRequestParameterMap()
on the wrappedExternalContext
object.Iterator<String>
getRequestParameterNames()
The default behavior of this method is to callExternalContext.getRequestParameterNames()
on the wrappedExternalContext
object.Map<String,String[]>
getRequestParameterValuesMap()
The default behavior of this method is to callExternalContext.getRequestParameterValuesMap()
on the wrappedExternalContext
object.String
getRequestPathInfo()
The default behavior of this method is to callExternalContext.getRequestPathInfo()
on the wrappedExternalContext
object.String
getRequestScheme()
The default behavior of this method is to callExternalContext.getRequestScheme()
on the wrappedExternalContext
object.String
getRequestServerName()
The default behavior of this method is to callExternalContext.getRequestServerName()
on the wrappedExternalContext
object.int
getRequestServerPort()
The default behavior of this method is to callExternalContext.getRequestServerPort()
on the wrappedExternalContext
object.String
getRequestServletPath()
The default behavior of this method is to callExternalContext.getRequestServletPath()
on the wrappedExternalContext
object.URL
getResource(String path)
The default behavior of this method is to callExternalContext.getResource(String)
on the wrappedExternalContext
object.InputStream
getResourceAsStream(String path)
The default behavior of this method is to callExternalContext.getResourceAsStream(String)
on the wrappedExternalContext
object.Set<String>
getResourcePaths(String path)
The default behavior of this method is to callExternalContext.getResourcePaths(String)
on the wrappedExternalContext
object.Object
getResponse()
The default behavior of this method is to callExternalContext.getResponse()
on the wrappedExternalContext
object.int
getResponseBufferSize()
The default behavior of this method is to callExternalContext.getResponseBufferSize()
on the wrappedExternalContext
object.String
getResponseCharacterEncoding()
The default behavior of this method is to callExternalContext.getResponseCharacterEncoding()
on the wrappedExternalContext
object.String
getResponseContentType()
The default behavior of this method is to callExternalContext.getResponseContentType()
on the wrappedExternalContext
object.OutputStream
getResponseOutputStream()
The default behavior of this method is to callExternalContext.getResponseOutputStream()
on the wrappedExternalContext
object.Writer
getResponseOutputWriter()
The default behavior of this method is to callExternalContext.getResponseOutputWriter()
on the wrappedExternalContext
object.Object
getSession(boolean create)
The default behavior of this method is to callExternalContext.getSession(boolean)
on the wrappedExternalContext
object.String
getSessionId(boolean create)
The default behavior of this method is to callExternalContext.getSessionId(boolean)
on the wrappedExternalContext
object.Map<String,Object>
getSessionMap()
The default behavior of this method is to callExternalContext.getSessionMap()
on the wrappedExternalContext
object.int
getSessionMaxInactiveInterval()
The default behavior of this method is to callExternalContext.getSessionMaxInactiveInterval()
on the wrappedExternalContext
object.Principal
getUserPrincipal()
The default behavior of this method is to callExternalContext.getUserPrincipal()
on the wrappedExternalContext
object.ExternalContext
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped.void
invalidateSession()
The default behavior of this method is to callExternalContext.invalidateSession()
on the wrappedExternalContext
object.boolean
isResponseCommitted()
The default behavior of this method is to callExternalContext.isResponseCommitted()
on the wrappedExternalContext
object.boolean
isSecure()
The default behavior of this method is to callExternalContext.isSecure()
on the wrappedExternalContext
object.boolean
isUserInRole(String role)
The default behavior of this method is to callExternalContext.isUserInRole(String)
on the wrappedExternalContext
object.void
log(String message)
The default behavior of this method is to callExternalContext.log(String)
on the wrappedExternalContext
object.void
log(String message, Throwable exception)
The default behavior of this method is to callExternalContext.log(String, Throwable)
on the wrappedExternalContext
object.void
redirect(String url)
The default behavior of this method is to callExternalContext.redirect(String)
on the wrappedExternalContext
object.void
release()
The default behavior of this method is to callExternalContext.release()
on the wrappedExternalContext
object.void
responseFlushBuffer()
The default behavior of this method is to callExternalContext.responseFlushBuffer()
on the wrappedExternalContext
object.void
responseReset()
The default behavior of this method is to callExternalContext.responseReset()
on the wrappedExternalContext
object.void
responseSendError(int statusCode, String message)
The default behavior of this method is to callExternalContext.responseSendError(int,String)
on the wrappedExternalContext
object.void
setClientWindow(ClientWindow window)
The default behavior of this method is to callExternalContext.setClientWindow(jakarta.faces.lifecycle.ClientWindow)
on the wrappedExternalContext
object.void
setRequest(Object request)
The default behavior of this method is to callExternalContext.setRequest(Object)
on the wrappedExternalContext
object.void
setRequestCharacterEncoding(String encoding)
The default behavior of this method is to callExternalContext.setRequestCharacterEncoding(String)
on the wrappedExternalContext
object.void
setResponse(Object response)
The default behavior of this method is to callExternalContext.setResponse(Object)
on the wrappedExternalContext
object.void
setResponseBufferSize(int size)
The default behavior of this method is to callExternalContext.setResponseBufferSize(int)
on the wrappedExternalContext
object.void
setResponseCharacterEncoding(String encoding)
The default behavior of this method is to callExternalContext.getResponseCharacterEncoding()
on the wrappedExternalContext
object.void
setResponseContentLength(int length)
The default behavior of this method is to callExternalContext.setResponseContentLength(int)
on the wrappedExternalContext
object.void
setResponseContentType(String contentType)
The default behavior of this method is to callExternalContext.setResponseContentType(String)
on the wrappedExternalContext
object.void
setResponseHeader(String name, String value)
The default behavior of this method is to callExternalContext.setResponseHeader(String,String)
on the wrappedExternalContext
object.void
setResponseStatus(int statusCode)
The default behavior of this method is to callExternalContext.setResponseStatus(int)
on the wrappedExternalContext
object.void
setSessionMaxInactiveInterval(int interval)
The default behavior of this method is to callExternalContext.setSessionMaxInactiveInterval(int)
on the wrappedExternalContext
object.
-
-
-
Constructor Detail
-
ExternalContextWrapper
@Deprecated public ExternalContextWrapper()
Deprecated.Use the other constructor taking the implementation being wrapped.
-
ExternalContextWrapper
public ExternalContextWrapper(ExternalContext wrapped)
If this external context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The
getWrapped()
will then return the implementation being wrapped.- Parameters:
wrapped
- The implementation being wrapped.- Since:
- 2.3
-
-
Method Detail
-
getWrapped
public 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 interfaceFacesWrapper<ExternalContext>
- Returns:
- the wrapped instance.
-
dispatch
public void dispatch(String path) throws IOException
The default behavior of this method is to call
ExternalContext.dispatch(String)
on the wrappedExternalContext
object.- Specified by:
dispatch
in classExternalContext
- Parameters:
path
- Context relative path to the specified resource, which must start with a slash ("/") character- Throws:
IOException
- if an input/output error occurs- See Also:
ExternalContext.dispatch(String)
-
encodeActionURL
public String encodeActionURL(String url)
The default behavior of this method is to call
ExternalContext.encodeActionURL(String)
on the wrappedExternalContext
object.- Specified by:
encodeActionURL
in classExternalContext
- Parameters:
url
- The input URL to be encoded- Returns:
- the encoded URL.
- See Also:
ExternalContext.encodeActionURL(String)
-
encodeNamespace
public String encodeNamespace(String name)
The default behavior of this method is to call
ExternalContext.encodeNamespace(String)
on the wrappedExternalContext
object.- Specified by:
encodeNamespace
in classExternalContext
- Parameters:
name
- Name to be encoded- Returns:
- the unique name prefixed with namespace.
- See Also:
ExternalContext.encodeNamespace(String)
-
encodePartialActionURL
public String encodePartialActionURL(String url)
The default behavior of this method is to call
ExternalContext.encodePartialActionURL(String)
on the wrappedExternalContext
object.- Overrides:
encodePartialActionURL
in classExternalContext
- Parameters:
url
- The input URL to be encoded- Returns:
- the encoded URL.
- See Also:
ExternalContext.encodePartialActionURL(String)
-
encodeResourceURL
public String encodeResourceURL(String url)
The default behavior of this method is to call
ExternalContext.encodeResourceURL(String)
on the wrappedExternalContext
object.- Specified by:
encodeResourceURL
in classExternalContext
- Parameters:
url
- The input URL to be encoded- Returns:
- the encoded resource URL.
- See Also:
ExternalContext.encodeResourceURL(String)
-
encodeWebsocketURL
public String encodeWebsocketURL(String url)
The default behavior of this method is to call
ExternalContext.encodeWebsocketURL(String)
on the wrappedExternalContext
object.- Specified by:
encodeWebsocketURL
in classExternalContext
- Parameters:
url
- The input URL to be encoded.- Returns:
- the encoded websocket URL.
- See Also:
ExternalContext.encodeWebsocketURL(String)
-
getApplicationMap
public Map<String,Object> getApplicationMap()
The default behavior of this method is to call
ExternalContext.getApplicationMap()
on the wrappedExternalContext
object.- Specified by:
getApplicationMap
in classExternalContext
- Returns:
- the map associated with the backed
ServletContext
. - See Also:
ExternalContext.getApplicationMap()
-
getApplicationContextPath
public String getApplicationContextPath()
The default behavior of this method is to call
ExternalContext.getApplicationContextPath()
on the wrappedExternalContext
object.- Overrides:
getApplicationContextPath
in classExternalContext
- Returns:
- the context path of this application.
- See Also:
ExternalContext.getApplicationContextPath()
-
getAuthType
public String getAuthType()
The default behavior of this method is to call
ExternalContext.getAuthType()
on the wrappedExternalContext
object.- Specified by:
getAuthType
in classExternalContext
- Returns:
- the authentication type.
- See Also:
ExternalContext.getAuthType()
-
getContext
public Object getContext()
The default behavior of this method is to call
ExternalContext.getContext()
on the wrappedExternalContext
object.- Specified by:
getContext
in classExternalContext
- Returns:
- the object of the
ServletContext
. - See Also:
ExternalContext.getContext()
-
getInitParameter
public String getInitParameter(String name)
The default behavior of this method is to call
ExternalContext.getInitParameter(String)
on the wrappedExternalContext
object.- Specified by:
getInitParameter
in classExternalContext
- Parameters:
name
- Name of the requested initialization parameter- Returns:
- the value of the specified parameter.
- See Also:
ExternalContext.getInitParameter(String)
-
getInitParameterMap
public Map getInitParameterMap()
The default behavior of this method is to call
ExternalContext.getInitParameterMap()
on the wrappedExternalContext
object.- Specified by:
getInitParameterMap
in classExternalContext
- Returns:
- the init parameter map for this application.
- See Also:
ExternalContext.getInitParameterMap()
-
getRemoteUser
public String getRemoteUser()
The default behavior of this method is to call
ExternalContext.getRemoteUser()
on the wrappedExternalContext
object.- Specified by:
getRemoteUser
in classExternalContext
- Returns:
- the user name of the current request.
- See Also:
ExternalContext.getRemoteUser()
-
getRequest
public Object getRequest()
The default behavior of this method is to call
ExternalContext.getRequest()
on the wrappedExternalContext
object.- Specified by:
getRequest
in classExternalContext
- Returns:
- the instance of the current request.
- See Also:
ExternalContext.getRequest()
-
getRequestContextPath
public String getRequestContextPath()
The default behavior of this method is to call
ExternalContext.getRequestContextPath()
on the wrappedExternalContext
object.- Specified by:
getRequestContextPath
in classExternalContext
- Returns:
- the context path for this request.
- See Also:
ExternalContext.getRequestContextPath()
-
getRequestCookieMap
public Map<String,Object> getRequestCookieMap()
The default behavior of this method is to call
ExternalContext.getRequestCookieMap()
on the wrappedExternalContext
object.- Specified by:
getRequestCookieMap
in classExternalContext
- Returns:
- the cookie map in the current request.
- See Also:
ExternalContext.getRequestCookieMap()
-
getRequestHeaderMap
public Map<String,String> getRequestHeaderMap()
The default behavior of this method is to call
ExternalContext.getRequestHeaderMap()
on the wrappedExternalContext
object.- Specified by:
getRequestHeaderMap
in classExternalContext
- Returns:
- the header map in the current request.
- See Also:
ExternalContext.getRequestHeaderMap()
-
getRequestHeaderValuesMap
public Map<String,String[]> getRequestHeaderValuesMap()
The default behavior of this method is to call
ExternalContext.getRequestHeaderValuesMap()
on the wrappedExternalContext
object.- Specified by:
getRequestHeaderValuesMap
in classExternalContext
- Returns:
- the header values map in the current request.
- See Also:
ExternalContext.getRequestHeaderValuesMap()
-
getRequestLocale
public Locale getRequestLocale()
The default behavior of this method is to call
ExternalContext.getRequestLocale()
on the wrappedExternalContext
object.- Specified by:
getRequestLocale
in classExternalContext
- Returns:
- the
Locale
of the current request. - See Also:
ExternalContext.getRequestLocale()
-
getRequestLocales
public Iterator<Locale> getRequestLocales()
The default behavior of this method is to call
ExternalContext.getRequestLocales()
on the wrappedExternalContext
object.- Specified by:
getRequestLocales
in classExternalContext
- Returns:
- the
Iterator
ofLocale
s of the current request. - See Also:
ExternalContext.getRequestLocales()
-
getRequestMap
public Map<String,Object> getRequestMap()
The default behavior of this method is to call
ExternalContext.getRequestMap()
on the wrappedExternalContext
object.- Specified by:
getRequestMap
in classExternalContext
- Returns:
- the map including the attributes of the current request.
- See Also:
ExternalContext.getRequestMap()
-
getRequestParameterMap
public Map<String,String> getRequestParameterMap()
The default behavior of this method is to call
ExternalContext.getRequestParameterMap()
on the wrappedExternalContext
object.- Specified by:
getRequestParameterMap
in classExternalContext
- Returns:
- the map for the current request parameters.
- See Also:
ExternalContext.getRequestParameterMap()
-
getRequestParameterNames
public Iterator<String> getRequestParameterNames()
The default behavior of this method is to call
ExternalContext.getRequestParameterNames()
on the wrappedExternalContext
object.- Specified by:
getRequestParameterNames
in classExternalContext
- Returns:
- the
Iterator
for the names of the current request parameters. - See Also:
ExternalContext.getRequestParameterNames()
-
getRequestParameterValuesMap
public Map<String,String[]> getRequestParameterValuesMap()
The default behavior of this method is to call
ExternalContext.getRequestParameterValuesMap()
on the wrappedExternalContext
object.- Specified by:
getRequestParameterValuesMap
in classExternalContext
- Returns:
- the map for the parameter values of the current request.
- See Also:
ExternalContext.getRequestParameterValuesMap()
-
getRequestPathInfo
public String getRequestPathInfo()
The default behavior of this method is to call
ExternalContext.getRequestPathInfo()
on the wrappedExternalContext
object.- Specified by:
getRequestPathInfo
in classExternalContext
- Returns:
- the path information of the current request.
- See Also:
ExternalContext.getRequestPathInfo()
-
getRequestServletPath
public String getRequestServletPath()
The default behavior of this method is to call
ExternalContext.getRequestServletPath()
on the wrappedExternalContext
object.- Specified by:
getRequestServletPath
in classExternalContext
- Returns:
- the Jakarta Servlet path information of the current request.
- See Also:
ExternalContext.getRequestServletPath()
-
getResource
public URL getResource(String path) throws MalformedURLException
The default behavior of this method is to call
ExternalContext.getResource(String)
on the wrappedExternalContext
object.- Specified by:
getResource
in classExternalContext
- Parameters:
path
- The path to the requested resource, which must start with a slash ("/" character- Returns:
- the URL of the resource.
- Throws:
MalformedURLException
- if the specified path is not in the correct form- See Also:
ExternalContext.getResource(String)
-
getResourceAsStream
public InputStream getResourceAsStream(String path)
The default behavior of this method is to call
ExternalContext.getResourceAsStream(String)
on the wrappedExternalContext
object.- Specified by:
getResourceAsStream
in classExternalContext
- Parameters:
path
- The path to the requested resource, which must start with a slash ("/" character- Returns:
- the
InputStream
for the application resource. - See Also:
ExternalContext.getResourceAsStream(String)
-
getResourcePaths
public Set<String> getResourcePaths(String path)
The default behavior of this method is to call
ExternalContext.getResourcePaths(String)
on the wrappedExternalContext
object.- Specified by:
getResourcePaths
in classExternalContext
- Parameters:
path
- Partial path used to match resources, which must start with a slash ("/") character- Returns:
- the
Set
of resource paths for the application resources. - See Also:
ExternalContext.getResourcePaths(String)
-
getResponse
public Object getResponse()
The default behavior of this method is to call
ExternalContext.getResponse()
on the wrappedExternalContext
object.- Specified by:
getResponse
in classExternalContext
- Returns:
- the instance of the current
jakarta.servlet.http.HttpServletResponse
. - See Also:
ExternalContext.getResponse()
-
getSession
public Object getSession(boolean create)
The default behavior of this method is to call
ExternalContext.getSession(boolean)
on the wrappedExternalContext
object.- Specified by:
getSession
in classExternalContext
- Parameters:
create
- Flag indicating whether or not a new session should be created if there is no session associated with the current request- Returns:
- the session object of the current request.
- See Also:
ExternalContext.getSession(boolean)
-
getSessionId
public String getSessionId(boolean create)
The default behavior of this method is to call
ExternalContext.getSessionId(boolean)
on the wrappedExternalContext
object.- Overrides:
getSessionId
in classExternalContext
- Parameters:
create
- Flag indicating whether or not a new session should be created if there is no session associated with the current request- Returns:
- the session id for the current request.
- Since:
- 2.2
- See Also:
ExternalContext.getSessionId(boolean)
-
getSessionMap
public Map<String,Object> getSessionMap()
The default behavior of this method is to call
ExternalContext.getSessionMap()
on the wrappedExternalContext
object.- Specified by:
getSessionMap
in classExternalContext
- Returns:
- the session map for the current application.
- See Also:
ExternalContext.getSessionMap()
-
getSessionMaxInactiveInterval
public int getSessionMaxInactiveInterval()
The default behavior of this method is to call
ExternalContext.getSessionMaxInactiveInterval()
on the wrappedExternalContext
object.- Overrides:
getSessionMaxInactiveInterval
in classExternalContext
- Returns:
- the session maximum inactive interval.
- See Also:
ExternalContext.getSessionMaxInactiveInterval()
-
setSessionMaxInactiveInterval
public void setSessionMaxInactiveInterval(int interval)
The default behavior of this method is to call
ExternalContext.setSessionMaxInactiveInterval(int)
on the wrappedExternalContext
object.- Overrides:
setSessionMaxInactiveInterval
in classExternalContext
- Parameters:
interval
- the value to be set.- See Also:
ExternalContext.setSessionMaxInactiveInterval(int)
-
setClientWindow
public void setClientWindow(ClientWindow window)
The default behavior of this method is to call
ExternalContext.setClientWindow(jakarta.faces.lifecycle.ClientWindow)
on the wrappedExternalContext
object.- Overrides:
setClientWindow
in classExternalContext
- Parameters:
window
- the window associated with this request.- Since:
- 2.2
-
getUserPrincipal
public Principal getUserPrincipal()
The default behavior of this method is to call
ExternalContext.getUserPrincipal()
on the wrappedExternalContext
object.- Specified by:
getUserPrincipal
in classExternalContext
- Returns:
- the
Principal
object. - See Also:
ExternalContext.getUserPrincipal()
-
getClientWindow
public ClientWindow getClientWindow()
The default behavior of this method is to call
ExternalContext.getClientWindow()
on the wrappedExternalContext
object.- Overrides:
getClientWindow
in classExternalContext
- Returns:
- the instance of the
ClientWindow
. - Since:
- 2.2
- See Also:
ExternalContext.getClientWindow()
-
isUserInRole
public boolean isUserInRole(String role)
The default behavior of this method is to call
ExternalContext.isUserInRole(String)
on the wrappedExternalContext
object.- Specified by:
isUserInRole
in classExternalContext
- Parameters:
role
- Logical role name to be checked- Returns:
- the flag indicating whether the current user is in the specified role.
- See Also:
ExternalContext.isUserInRole(String)
-
log
public void log(String message)
The default behavior of this method is to call
ExternalContext.log(String)
on the wrappedExternalContext
object.- Specified by:
log
in classExternalContext
- Parameters:
message
- Message to be logged- See Also:
ExternalContext.log(String)
-
log
public void log(String message, Throwable exception)
The default behavior of this method is to call
ExternalContext.log(String, Throwable)
on the wrappedExternalContext
object.- Specified by:
log
in classExternalContext
- Parameters:
message
- Message to be loggedexception
- Exception to be logged- See Also:
ExternalContext.log(String, Throwable)
-
redirect
public void redirect(String url) throws IOException
The default behavior of this method is to call
ExternalContext.redirect(String)
on the wrappedExternalContext
object.- Specified by:
redirect
in classExternalContext
- Parameters:
url
- Absolute URL to which the client should be redirected- Throws:
IOException
- if an input/output error occurs- See Also:
ExternalContext.redirect(String)
-
addResponseCookie
public void addResponseCookie(String name, String value, Map<String,Object> properties)
The default behavior of this method is to call
ExternalContext.addResponseCookie(String, String, Map)
on the wrappedExternalContext
object.- Overrides:
addResponseCookie
in classExternalContext
- Parameters:
name
- To be passed as the first argument to theCookie
constructor.value
- To be passed as the second argument to theCookie
constructor.properties
- AMap
containg key/value pairs to be passed as arguments to the setter methods as described above.- See Also:
ExternalContext.addResponseCookie(String, String, Map)
-
getMimeType
public String getMimeType(String file)
The default behavior of this method is to call
ExternalContext.getMimeType(String)
on the wrappedExternalContext
object.- Overrides:
getMimeType
in classExternalContext
- Parameters:
file
- The file for which the mime type should be obtained.- Returns:
- the MIME type of the file.
- See Also:
ExternalContext.getMimeType(String)
-
getContextName
public String getContextName()
The default behavior of this method is to call
ExternalContext.getContextName()
on the wrappedExternalContext
object.- Overrides:
getContextName
in classExternalContext
- Returns:
- the name the
ServletContext
. - See Also:
ExternalContext.getContextName()
-
setRequest
public void setRequest(Object request)
The default behavior of this method is to call
ExternalContext.setRequest(Object)
on the wrappedExternalContext
object.- Overrides:
setRequest
in classExternalContext
- Parameters:
request
- the request object to be set.- See Also:
ExternalContext.setRequest(Object)
-
getRequestScheme
public String getRequestScheme()
The default behavior of this method is to call
ExternalContext.getRequestScheme()
on the wrappedExternalContext
object.- Overrides:
getRequestScheme
in classExternalContext
- Returns:
- the name of the scheme.
- See Also:
ExternalContext.getRequestScheme()
-
getRequestServerName
public String getRequestServerName()
The default behavior of this method is to call
ExternalContext.getRequestServerName()
on the wrappedExternalContext
object.- Overrides:
getRequestServerName
in classExternalContext
- Returns:
- the host name of the server.
- See Also:
ExternalContext.getRequestServerName()
-
getRequestServerPort
public int getRequestServerPort()
The default behavior of this method is to call
ExternalContext.getRequestServerPort()
on the wrappedExternalContext
object.- Overrides:
getRequestServerPort
in classExternalContext
- Returns:
- the port number to which the request was sent.
- See Also:
ExternalContext.getRequestServerPort()
-
setRequestCharacterEncoding
public void setRequestCharacterEncoding(String encoding) throws UnsupportedEncodingException
The default behavior of this method is to call
ExternalContext.setRequestCharacterEncoding(String)
on the wrappedExternalContext
object.- Overrides:
setRequestCharacterEncoding
in classExternalContext
- Parameters:
encoding
- the encoding name to be set.- Throws:
UnsupportedEncodingException
- if this is not a valid encoding- See Also:
ExternalContext.setRequestCharacterEncoding(String)
-
getRealPath
public String getRealPath(String path)
The default behavior of this method is to call
ExternalContext.getRealPath(String)
on the wrappedExternalContext
object.- Overrides:
getRealPath
in classExternalContext
- Parameters:
path
- The context of the requested initialization parameter- Returns:
- the real path for the specified virtual path.
- See Also:
ExternalContext.getRealPath(String)
-
getRequestCharacterEncoding
public String getRequestCharacterEncoding()
The default behavior of this method is to call
ExternalContext.getRequestCharacterEncoding()
on the wrappedExternalContext
object.- Overrides:
getRequestCharacterEncoding
in classExternalContext
- Returns:
- the character encoding currently being used.
- See Also:
ExternalContext.getRequestCharacterEncoding()
-
getRequestContentType
public String getRequestContentType()
The default behavior of this method is to call
ExternalContext.getRequestContentType()
on the wrappedExternalContext
object.- Overrides:
getRequestContentType
in classExternalContext
- Returns:
- the Content-Type for this request.
- See Also:
ExternalContext.getRequestContentType()
-
getRequestContentLength
public int getRequestContentLength()
The default behavior of this method is to call
ExternalContext.getRequestContentLength()
on the wrappedExternalContext
object.- Overrides:
getRequestContentLength
in classExternalContext
- Returns:
- the content length of the current request.
- See Also:
ExternalContext.getRequestContentLength()
-
getResponseCharacterEncoding
public String getResponseCharacterEncoding()
The default behavior of this method is to call
ExternalContext.getResponseCharacterEncoding()
on the wrappedExternalContext
object.- Overrides:
getResponseCharacterEncoding
in classExternalContext
- Returns:
- the name of the character encoding.
- See Also:
ExternalContext.getResponseCharacterEncoding()
-
getResponseContentType
public String getResponseContentType()
The default behavior of this method is to call
ExternalContext.getResponseContentType()
on the wrappedExternalContext
object.- Overrides:
getResponseContentType
in classExternalContext
- Returns:
- the MIME Content-Type for this response.
- See Also:
ExternalContext.getResponseContentType()
-
setResponse
public void setResponse(Object response)
The default behavior of this method is to call
ExternalContext.setResponse(Object)
on the wrappedExternalContext
object.- Overrides:
setResponse
in classExternalContext
- Parameters:
response
- the response instance to be set.- See Also:
ExternalContext.setResponse(Object)
-
getResponseOutputStream
public OutputStream getResponseOutputStream() throws IOException
The default behavior of this method is to call
ExternalContext.getResponseOutputStream()
on the wrappedExternalContext
object.- Overrides:
getResponseOutputStream
in classExternalContext
- Returns:
- the
OutputStream
for the current response. - Throws:
IOException
- any IO related exception.- See Also:
ExternalContext.getResponseOutputStream()
-
getResponseOutputWriter
public Writer getResponseOutputWriter() throws IOException
The default behavior of this method is to call
ExternalContext.getResponseOutputWriter()
on the wrappedExternalContext
object.- Overrides:
getResponseOutputWriter
in classExternalContext
- Returns:
- the
Writer
for the current response. - Throws:
IOException
- any IO related exception.- See Also:
ExternalContext.getResponseOutputWriter()
-
setResponseCharacterEncoding
public void setResponseCharacterEncoding(String encoding)
The default behavior of this method is to call
ExternalContext.getResponseCharacterEncoding()
on the wrappedExternalContext
object.- Overrides:
setResponseCharacterEncoding
in classExternalContext
- Parameters:
encoding
- the character encoding to be sent by the current response.- See Also:
ExternalContext.getResponseCharacterEncoding()
-
setResponseContentType
public void setResponseContentType(String contentType)
The default behavior of this method is to call
ExternalContext.setResponseContentType(String)
on the wrappedExternalContext
object.- Overrides:
setResponseContentType
in classExternalContext
- Parameters:
contentType
- The content type to be set as the contentType of the response.- See Also:
ExternalContext.setResponseContentType(String)
-
invalidateSession
public void invalidateSession()
The default behavior of this method is to call
ExternalContext.invalidateSession()
on the wrappedExternalContext
object.- Overrides:
invalidateSession
in classExternalContext
- See Also:
ExternalContext.invalidateSession()
-
setResponseHeader
public void setResponseHeader(String name, String value)
The default behavior of this method is to call
ExternalContext.setResponseHeader(String,String)
on the wrappedExternalContext
object.- Overrides:
setResponseHeader
in classExternalContext
- Parameters:
name
- The name of the response header.value
- The value of the response header.- See Also:
ExternalContext.setResponseHeader(String,String)
-
addResponseHeader
public void addResponseHeader(String name, String value)
The default behavior of this method is to call
ExternalContext.addResponseHeader(String,String)
on the wrappedExternalContext
object.- Overrides:
addResponseHeader
in classExternalContext
- Parameters:
name
- The name of the response header.value
- The value of the response header.- See Also:
ExternalContext.addResponseHeader(String,String)
-
setResponseBufferSize
public void setResponseBufferSize(int size)
The default behavior of this method is to call
ExternalContext.setResponseBufferSize(int)
on the wrappedExternalContext
object.- Overrides:
setResponseBufferSize
in classExternalContext
- Parameters:
size
- the new buffer size- See Also:
ExternalContext.setResponseBufferSize(int)
-
getResponseBufferSize
public int getResponseBufferSize()
The default behavior of this method is to call
ExternalContext.getResponseBufferSize()
on the wrappedExternalContext
object.- Overrides:
getResponseBufferSize
in classExternalContext
- Returns:
- the buffer size of the response.
- See Also:
ExternalContext.getResponseBufferSize()
-
isResponseCommitted
public boolean isResponseCommitted()
The default behavior of this method is to call
ExternalContext.isResponseCommitted()
on the wrappedExternalContext
object.- Overrides:
isResponseCommitted
in classExternalContext
- Returns:
- the flag indicating whether the current response has been committed.
- See Also:
ExternalContext.isResponseCommitted()
-
isSecure
public boolean isSecure()
The default behavior of this method is to call
ExternalContext.isSecure()
on the wrappedExternalContext
object.- Overrides:
isSecure
in classExternalContext
- Returns:
- the boolean indicating whether this request is secured.
-
responseReset
public void responseReset()
The default behavior of this method is to call
ExternalContext.responseReset()
on the wrappedExternalContext
object.- Overrides:
responseReset
in classExternalContext
- See Also:
ExternalContext.responseReset()
-
responseSendError
public void responseSendError(int statusCode, String message) throws IOException
The default behavior of this method is to call
ExternalContext.responseSendError(int,String)
on the wrappedExternalContext
object.- Overrides:
responseSendError
in classExternalContext
- Parameters:
statusCode
- an HTTP status codemessage
- an option message to detail the cause of the code- Throws:
IOException
- any IO related exceptions.- See Also:
ExternalContext.responseSendError(int,String)
-
setResponseStatus
public void setResponseStatus(int statusCode)
The default behavior of this method is to call
ExternalContext.setResponseStatus(int)
on the wrappedExternalContext
object.- Overrides:
setResponseStatus
in classExternalContext
- Parameters:
statusCode
- an HTTP status code- See Also:
ExternalContext.setResponseStatus(int)
-
responseFlushBuffer
public void responseFlushBuffer() throws IOException
The default behavior of this method is to call
ExternalContext.responseFlushBuffer()
on the wrappedExternalContext
object.- Overrides:
responseFlushBuffer
in classExternalContext
- Throws:
IOException
- any IO related exception.- See Also:
ExternalContext.responseFlushBuffer()
-
setResponseContentLength
public void setResponseContentLength(int length)
The default behavior of this method is to call
ExternalContext.setResponseContentLength(int)
on the wrappedExternalContext
object.- Overrides:
setResponseContentLength
in classExternalContext
- Parameters:
length
- the value to be set.- See Also:
ExternalContext.setResponseContentLength(int)
-
encodeBookmarkableURL
public String encodeBookmarkableURL(String baseUrl, Map<String,List<String>> parameters)
The default behavior of this method is to call
ExternalContext.encodeBookmarkableURL(String, java.util.Map)
on the wrappedExternalContext
object.- Overrides:
encodeBookmarkableURL
in classExternalContext
- Parameters:
baseUrl
- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters
- The collection of Parameter objects, representing name=value pairs that are used to produce a query string- Returns:
- the result of encoding.
- See Also:
ExternalContext.encodeBookmarkableURL(String, java.util.Map)
-
encodeRedirectURL
public String encodeRedirectURL(String baseUrl, Map<String,List<String>> parameters)
The default behavior of this method is to call
ExternalContext.encodeRedirectURL(String, java.util.Map)
on the wrappedExternalContext
object.- Overrides:
encodeRedirectURL
in classExternalContext
- Parameters:
baseUrl
- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters
- The collection of Parameter objects, representing name=value pairs that are used to produce a query string- Returns:
- the result of encoding.
- See Also:
ExternalContext.encodeRedirectURL(String, java.util.Map)
-
getFlash
public Flash getFlash()
The default behavior of this method is to call
ExternalContext.getFlash()
on the wrappedExternalContext
object.- Overrides:
getFlash
in classExternalContext
- Returns:
- the
Flash
for this application. - See Also:
ExternalContext.getFlash()
-
release
public void release()
The default behavior of this method is to call
ExternalContext.release()
on the wrappedExternalContext
object.- Specified by:
release
in classExternalContext
- See Also:
ExternalContext.release()
-
-