Package jakarta.faces.context
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>
- 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addResponseHeader
(String name, String value) void
encodeActionURL
(String url) encodeNamespace
(String name) encodeResourceURL
(String url) encodeWebsocketURL
(String url) Returns the name of the underlying contextgetFlash()
getInitParameter
(String name) getMimeType
(String file) getRealPath
(String path) int
int
getResource
(String path) getResourceAsStream
(String path) getResourcePaths
(String path) int
throwsUnsupportedOperationException
by default.getSession
(boolean create) getSessionId
(boolean create) int
A class that implements this interface uses this method to return an instance of the class being wrapped.void
boolean
boolean
isSecure()
boolean
isUserInRole
(String role) void
void
void
void
release()
void
void
void
responseSendError
(int statusCode, String message) void
setClientWindow
(ClientWindow window) void
setRequest
(Object request) throwsUnsupportedOperationException
by default.void
setRequestCharacterEncoding
(String encoding) throwsUnsupportedOperationException
by default.void
setResponse
(Object response) throwsUnsupportedOperationException
by default.void
setResponseBufferSize
(int size) void
setResponseCharacterEncoding
(String encoding) throwsUnsupportedOperationException
by default.void
setResponseContentLength
(int length) void
setResponseContentLengthLong
(long length) void
setResponseContentType
(String contentType) void
setResponseHeader
(String name, String value) void
setResponseStatus
(int statusCode) void
setSessionMaxInactiveInterval
(int interval)
-
Constructor Details
-
ExternalContextWrapper
Deprecated. -
ExternalContextWrapper
-
-
Method Details
-
addResponseCookie
- Overrides:
addResponseCookie
in classExternalContext
-
addResponseHeader
- Overrides:
addResponseHeader
in classExternalContext
-
dispatch
- Specified by:
dispatch
in classExternalContext
- Throws:
IOException
-
encodeActionURL
- Specified by:
encodeActionURL
in classExternalContext
-
encodeBookmarkableURL
- Overrides:
encodeBookmarkableURL
in classExternalContext
-
encodeNamespace
- Specified by:
encodeNamespace
in classExternalContext
-
encodePartialActionURL
- Overrides:
encodePartialActionURL
in classExternalContext
-
encodeRedirectURL
- Overrides:
encodeRedirectURL
in classExternalContext
-
encodeResourceURL
- Specified by:
encodeResourceURL
in classExternalContext
-
getApplicationMap
- Specified by:
getApplicationMap
in classExternalContext
-
getAuthType
- Specified by:
getAuthType
in classExternalContext
-
getContext
- Specified by:
getContext
in classExternalContext
-
getContextName
Description copied from class:ExternalContext
Returns the name of the underlying context- Overrides:
getContextName
in classExternalContext
- Returns:
- the name or null
-
getFlash
- Overrides:
getFlash
in classExternalContext
-
getInitParameter
- Specified by:
getInitParameter
in classExternalContext
-
getInitParameterMap
- Specified by:
getInitParameterMap
in classExternalContext
-
getMimeType
- Overrides:
getMimeType
in classExternalContext
-
getRealPath
- Overrides:
getRealPath
in classExternalContext
-
getRemoteUser
- Specified by:
getRemoteUser
in classExternalContext
-
getRequest
- Specified by:
getRequest
in classExternalContext
-
getRequestCharacterEncoding
- Overrides:
getRequestCharacterEncoding
in classExternalContext
-
getRequestContentLength
public int getRequestContentLength()- Overrides:
getRequestContentLength
in classExternalContext
- Returns:
-
getRequestContentType
- Overrides:
getRequestContentType
in classExternalContext
-
getRequestContextPath
- Specified by:
getRequestContextPath
in classExternalContext
-
getRequestCookieMap
- Specified by:
getRequestCookieMap
in classExternalContext
-
getRequestHeaderMap
- Specified by:
getRequestHeaderMap
in classExternalContext
-
getRequestHeaderValuesMap
- Specified by:
getRequestHeaderValuesMap
in classExternalContext
-
getRequestLocale
- Specified by:
getRequestLocale
in classExternalContext
-
getRequestLocales
- Specified by:
getRequestLocales
in classExternalContext
-
getRequestMap
- Specified by:
getRequestMap
in classExternalContext
-
getRequestParameterMap
- Specified by:
getRequestParameterMap
in classExternalContext
-
getRequestParameterNames
- Specified by:
getRequestParameterNames
in classExternalContext
-
getRequestParameterValuesMap
- Specified by:
getRequestParameterValuesMap
in classExternalContext
-
getRequestPathInfo
- Specified by:
getRequestPathInfo
in classExternalContext
-
getRequestScheme
- Overrides:
getRequestScheme
in classExternalContext
-
getRequestServerName
- Overrides:
getRequestServerName
in classExternalContext
-
getRequestServerPort
public int getRequestServerPort()- Overrides:
getRequestServerPort
in classExternalContext
-
getRequestServletPath
- Specified by:
getRequestServletPath
in classExternalContext
-
getResource
- Specified by:
getResource
in classExternalContext
- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStream
in classExternalContext
-
getResourcePaths
- Specified by:
getResourcePaths
in classExternalContext
-
getResponse
- Specified by:
getResponse
in classExternalContext
-
getResponseBufferSize
public int getResponseBufferSize()- Overrides:
getResponseBufferSize
in classExternalContext
- Returns:
-
getResponseCharacterEncoding
- Overrides:
getResponseCharacterEncoding
in classExternalContext
-
getResponseContentType
Description copied from class:ExternalContext
throwsUnsupportedOperationException
by default.- Overrides:
getResponseContentType
in classExternalContext
-
getResponseOutputStream
- Overrides:
getResponseOutputStream
in classExternalContext
- Throws:
IOException
-
getResponseOutputWriter
- Overrides:
getResponseOutputWriter
in classExternalContext
- Throws:
IOException
-
getSession
- Specified by:
getSession
in classExternalContext
-
getSessionMap
- Specified by:
getSessionMap
in classExternalContext
-
getUserPrincipal
- Specified by:
getUserPrincipal
in classExternalContext
-
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 instance of the class being wrapped
-
invalidateSession
public void invalidateSession()- Overrides:
invalidateSession
in classExternalContext
-
isResponseCommitted
public boolean isResponseCommitted()- Overrides:
isResponseCommitted
in classExternalContext
-
isUserInRole
- Specified by:
isUserInRole
in classExternalContext
-
log
- Specified by:
log
in classExternalContext
-
log
- Specified by:
log
in classExternalContext
-
redirect
- Specified by:
redirect
in classExternalContext
- Throws:
IOException
-
responseFlushBuffer
- Overrides:
responseFlushBuffer
in classExternalContext
- Throws:
IOException
-
responseReset
public void responseReset()- Overrides:
responseReset
in classExternalContext
-
responseSendError
- Overrides:
responseSendError
in classExternalContext
- Throws:
IOException
-
setRequest
Description copied from class:ExternalContext
throwsUnsupportedOperationException
by default.- Overrides:
setRequest
in classExternalContext
-
setRequestCharacterEncoding
Description copied from class:ExternalContext
throwsUnsupportedOperationException
by default.- Overrides:
setRequestCharacterEncoding
in classExternalContext
- Throws:
UnsupportedEncodingException
-
setResponse
Description copied from class:ExternalContext
throwsUnsupportedOperationException
by default.- Overrides:
setResponse
in classExternalContext
-
setResponseBufferSize
public void setResponseBufferSize(int size) - Overrides:
setResponseBufferSize
in classExternalContext
-
setResponseCharacterEncoding
Description copied from class:ExternalContext
throwsUnsupportedOperationException
by default.- Overrides:
setResponseCharacterEncoding
in classExternalContext
-
setResponseContentLength
public void setResponseContentLength(int length) - Overrides:
setResponseContentLength
in classExternalContext
-
setResponseContentLengthLong
public void setResponseContentLengthLong(long length) - Overrides:
setResponseContentLengthLong
in classExternalContext
-
setResponseContentType
- Overrides:
setResponseContentType
in classExternalContext
-
setResponseHeader
- Overrides:
setResponseHeader
in classExternalContext
-
setResponseStatus
public void setResponseStatus(int statusCode) - Overrides:
setResponseStatus
in classExternalContext
-
isSecure
public boolean isSecure()- Overrides:
isSecure
in classExternalContext
- Returns:
-
getSessionMaxInactiveInterval
public int getSessionMaxInactiveInterval()- Overrides:
getSessionMaxInactiveInterval
in classExternalContext
- Returns:
-
setSessionMaxInactiveInterval
public void setSessionMaxInactiveInterval(int interval) - Overrides:
setSessionMaxInactiveInterval
in classExternalContext
-
getClientWindow
- Overrides:
getClientWindow
in classExternalContext
- Returns:
-
setClientWindow
- Overrides:
setClientWindow
in classExternalContext
-
getSessionId
- Overrides:
getSessionId
in classExternalContext
- Returns:
-
getApplicationContextPath
- Overrides:
getApplicationContextPath
in classExternalContext
- Returns:
-
encodeWebsocketURL
- Specified by:
encodeWebsocketURL
in classExternalContext
- Returns:
-
release
public void release()- Specified by:
release
in classExternalContext
- Since:
- 4.0
-