Provides
a simple implementation of ExternalContext that can
be subclassed by developers wishing to provide specialized behavior
to an existing ExternalContext instance. The default
implementation of all methods is to call through to the wrapped
ExternalContext instance.
Usage: extend this class and push the implementation being wrapped to the
constructor and use getWrapped to access the instance being wrapped.
| Modifier and Type | Field and Description |
|---|---|
| private ExternalContext |
| Access | Constructor and Description |
|---|---|
| public | ExternalContextWrapper()
Deprecated
Use the other constructor taking the implementation being wrapped.
|
| public | ExternalContextWrapper(ExternalContext
The implementation being wrapped. wrapped)If this external context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addResponseCookie(String
To be passed as the first argument to the
name, String Cookie constructor.To be passed as the second argument to the
value, Map<String, Object> Cookie constructor.A properties)Map containg key/value pairs to be passed
as arguments to the setter methods as described above.Overrides javax. The default behavior of this method is to
call |
| public void | addResponseHeader(String
The name of the response header. name, String The value of the response header. value)Overrides javax. The default behavior of this method is to
call |
| public void | dispatch(String
Context relative path to the specified resource,
which must start with a slash ("/") character path)Implements abstract javax. The default behavior of this method is to
call |
| public String | encodeActionURL(String
The input URL to be encoded url)Implements abstract javax. The default behavior of this method is to
call |
| public String | encodeBookmarkableURL(String
The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters. baseUrl, Map<String, List<String>> The collection of Parameter objects, representing name=value pairs that are used to produce a query string parameters)Overrides javax. The default behavior of this method is to
call |
| public String | encodeNamespace(String
Name to be encoded name)Implements abstract javax. The default behavior of this method is to
call |
| public String | encodePartialActionURL(String
The input URL to be encoded url)Overrides javax. The default behavior of this method is to
call |
| public String | encodeRedirectURL(String
The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters. baseUrl, Map<String, List<String>> The collection of Parameter objects, representing name=value pairs that are used to produce a query string parameters)Overrides javax. The default behavior of this method is to
call |
| public String | encodeResourceURL(String
The input URL to be encoded url)Implements abstract javax. The default behavior of this method is to
call |
| public String | encodeWebsocketURL(String
The input URL to be encoded. url)Implements abstract javax. The default behavior of this method is to
call |
| public String | getApplicationContextPath()
Overrides javax. The default behavior of this method is to
call |
| public Map | getApplicationMap()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getAuthType()
Implements abstract javax. The default behavior of this method is to
call |
| public ClientWindow | getClientWindow()
Overrides javax. The default behavior of this method is to
call |
| public Object | getContext()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getContextName()
Overrides javax. The default behavior of this method is to
call |
| public Flash | getFlash()
Overrides javax. The default behavior of this method is to
call |
| public String | getInitParameter(String
Name of the requested initialization parameter name)Implements abstract javax. The default behavior of this method is to
call |
| public Map | getInitParameterMap()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getMimeType(String
The file for which the mime type should be obtained. file)Overrides javax. The default behavior of this method is to
call |
| public String | getRealPath(String
The context of the requested initialization parameter path)Overrides javax. The default behavior of this method is to
call |
| public String | getRemoteUser()
Implements abstract javax. The default behavior of this method is to
call |
| public Object | getRequest()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getRequestCharacterEncoding()
Overrides javax. The default behavior of this method is to
call |
| public int | getRequestContentLength()
Overrides javax. The default behavior of this method is to
call |
| public String | getRequestContentType()
Overrides javax. The default behavior of this method is to
call |
| public String | getRequestContextPath()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestCookieMap()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestHeaderMap()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestHeaderValuesMap()
Implements abstract javax. The default behavior of this method is to
call |
| public Locale | getRequestLocale()
Implements abstract javax. The default behavior of this method is to
call |
| public Iterator | getRequestLocales()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestMap()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestParameterMap()
Implements abstract javax. The default behavior of this method is to
call |
| public Iterator | getRequestParameterNames()
Implements abstract javax. The default behavior of this method is to
call |
| public Map | getRequestParameterValuesMap()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getRequestPathInfo()
Implements abstract javax. The default behavior of this method is to
call |
| public String | getRequestScheme()
Overrides javax. The default behavior of this method is to
call |
| public String | getRequestServerName()
Overrides javax. The default behavior of this method is to
call |
| public int | getRequestServerPort()
Overrides javax. The default behavior of this method is to
call |
| public String | getRequestServletPath()
Implements abstract javax. The default behavior of this method is to
call |
| public URL | getResource(String
The path to the requested resource, which must
start with a slash ("/" character path)Implements abstract javax. The default behavior of this method is to
call |
| public InputStream | getResourceAsStream(String
The path to the requested resource, which must
start with a slash ("/" character path)Implements abstract javax. The default behavior of this method is to
call |
| public Set | getResourcePaths(String
Partial path used to match resources, which must
start with a slash ("/") character path)Implements abstract javax. The default behavior of this method is to
call |
| public Object | getResponse()
Implements abstract javax. The default behavior of this method is to
call |
| public int | getResponseBufferSize()
Overrides javax. The default behavior of this method is to
call |
| public String | getResponseCharacterEncoding()
Overrides javax. The default behavior of this method is to
call |
| public String | getResponseContentType()
Overrides javax. The default behavior of this method is to
call |
| public OutputStream | getResponseOutputStream()
Overrides javax. The default behavior of this method is to
call |
| public Writer | getResponseOutputWriter()
Overrides javax. The default behavior of this method is to
call |
| public Object | getSession(boolean
Flag indicating whether or not a new session should be
created if there is no session associated with the current request create)Implements abstract javax. The default behavior of this method is to
call |
| public String | getSessionId(boolean
Flag indicating whether or not a new session should be
created if there is no session associated with the current request create)Overrides javax. The default behavior of this method is to
call |
| public Map | getSessionMap()
Implements abstract javax. The default behavior of this method is to
call |
| public int | getSessionMaxInactiveInterval()
Overrides javax. The default behavior of this method is to
call |
| public Principal | getUserPrincipal()
Implements abstract javax. The default behavior of this method is to
call |
| public ExternalContext | getWrapped()
Implements javax. A class that implements this interface uses this method to return an instance of the class being wrapped. |
| public void | invalidateSession()
Overrides javax. The default behavior of this method is to
call |
| public boolean | isResponseCommitted()
Overrides javax. The default behavior of this method is to
call |
| public boolean | isSecure()
Overrides javax. The default behavior of this method is to
call |
| public boolean | isUserInRole(String
Logical role name to be checked role)Implements abstract javax. The default behavior of this method is to
call |
| public void | log(String
Message to be logged message)Implements abstract javax. The default behavior of this method is to
call |
| public void | log(String
Message to be logged message, Throwable Exception to be logged exception)Implements abstract javax. The default behavior of this method is to
call |
| public void | redirect(String
Absolute URL to which the client should be redirected url)Implements abstract javax. The default behavior of this method is to
call |
| public void | responseFlushBuffer()
Overrides javax. The default behavior of this method is to
call |
| public void | responseReset()
Overrides javax. The default behavior of this method is to
call |
| public void | responseSendError(int
an HTTP status code statusCode, String an option message to detail the cause of the code message)Overrides javax. The default behavior of this method is to
call |
| public void | setClientWindow(ClientWindow
the window associated with this request. window)Overrides javax. The default behavior of this method is to
call |
| public void | setRequest(Object
the request object to be set. request)Overrides javax. The default behavior of this method is to
call |
| public void | setRequestCharacterEncoding(String
the encoding name to be set. encoding)Overrides javax. The default behavior of this method is to
call |
| public void | setResponse(Object
the response instance to be set. response)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseBufferSize(int
the new buffer size size)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseCharacterEncoding(String
the character encoding to be sent by the current response. encoding)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseContentLength(int
the value to be set. length)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseContentType(String
The content type to be set as the contentType
of the response. contentType)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseHeader(String
The name of the response header. name, String The value of the response header. value)Overrides javax. The default behavior of this method is to
call |
| public void | setResponseStatus(int
an HTTP status code statusCode)Overrides javax. The default behavior of this method is to
call |
| public void | setSessionMaxInactiveInterval(int
the value to be set. interval)Overrides javax. The default behavior of this method is to
call |