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 jakarta.
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 jakarta.
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 jakarta.
The default behavior of this method is to call |
public String | encodeActionURL(String
The input URL to be encoded url)Implements abstract jakarta.
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 jakarta.
The default behavior of this method is to call
|
public String | encodeNamespace(String
Name to be encoded name)Implements abstract jakarta.
The default behavior of this method is to call |
public String | encodePartialActionURL(String
The input URL to be encoded url)Overrides jakarta.
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 jakarta.
The default behavior of this method is to call
|
public String | encodeResourceURL(String
The input URL to be encoded url)Implements abstract jakarta.
The default behavior of this method is to call |
public String | encodeWebsocketURL(String
The input URL to be encoded. url)Implements abstract jakarta.
The default behavior of this method is to call |
public String | getApplicationContextPath()
Overrides jakarta.
The default behavior of this method is to call |
public Map | getApplicationMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public String | getAuthType()
Implements abstract jakarta.
The default behavior of this method is to call |
public ClientWindow | getClientWindow()
Overrides jakarta.
The default behavior of this method is to call |
public Object | getContext()
Implements abstract jakarta.
The default behavior of this method is to call |
public String | getContextName()
Overrides jakarta.
The default behavior of this method is to call |
public Flash | getFlash()
Overrides jakarta.
The default behavior of this method is to call |
public String | getInitParameter(String
Name of the requested initialization parameter name)Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getInitParameterMap()
Implements abstract jakarta.
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 jakarta.
The default behavior of this method is to call |
public String | getRealPath(String
The context of the requested initialization parameter path)Overrides jakarta.
The default behavior of this method is to call |
public String | getRemoteUser()
Implements abstract jakarta.
The default behavior of this method is to call |
public Object | getRequest()
Implements abstract jakarta.
The default behavior of this method is to call |
public String | getRequestCharacterEncoding()
Overrides jakarta.
The default behavior of this method is to call |
public int | getRequestContentLength()
Overrides jakarta.
The default behavior of this method is to call |
public String | getRequestContentType()
Overrides jakarta.
The default behavior of this method is to call |
public String | getRequestContextPath()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestCookieMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestHeaderMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestHeaderValuesMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public Locale | getRequestLocale()
Implements abstract jakarta.
The default behavior of this method is to call |
public Iterator | getRequestLocales()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestParameterMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public Iterator | getRequestParameterNames()
Implements abstract jakarta.
The default behavior of this method is to call |
public Map | getRequestParameterValuesMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public String | getRequestPathInfo()
Implements abstract jakarta.
The default behavior of this method is to call |
public String | getRequestScheme()
Overrides jakarta.
The default behavior of this method is to call |
public String | getRequestServerName()
Overrides jakarta.
The default behavior of this method is to call |
public int | getRequestServerPort()
Overrides jakarta.
The default behavior of this method is to call |
public String | getRequestServletPath()
Implements abstract jakarta.
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 jakarta.
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 jakarta.
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 jakarta.
The default behavior of this method is to call |
public Object | getResponse()
Implements abstract jakarta.
The default behavior of this method is to call |
public int | getResponseBufferSize()
Overrides jakarta.
The default behavior of this method is to call |
public String | getResponseCharacterEncoding()
Overrides jakarta.
The default behavior of this method is to call |
public String | getResponseContentType()
Overrides jakarta.
The default behavior of this method is to call |
public OutputStream | getResponseOutputStream()
Overrides jakarta.
The default behavior of this method is to call |
public Writer | getResponseOutputWriter()
Overrides jakarta.
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 jakarta.
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 jakarta.
The default behavior of this method is to call |
public Map | getSessionMap()
Implements abstract jakarta.
The default behavior of this method is to call |
public int | getSessionMaxInactiveInterval()
Overrides jakarta.
The default behavior of this method is to call |
public Principal | getUserPrincipal()
Implements abstract jakarta.
The default behavior of this method is to call |
public ExternalContext | getWrapped()
Implements jakarta. A class that implements this interface uses this method to return an instance of the class being wrapped. |
public void | invalidateSession()
Overrides jakarta.
The default behavior of this method is to call |
public boolean | isResponseCommitted()
Overrides jakarta.
The default behavior of this method is to call |
public boolean | isSecure()
Overrides jakarta.
The default behavior of this method is to call |
public boolean | isUserInRole(String
Logical role name to be checked role)Implements abstract jakarta.
The default behavior of this method is to call |
public void | log(String
Message to be logged message)Implements abstract jakarta.
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 jakarta.
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 jakarta.
The default behavior of this method is to call |
public void | release()
Implements abstract jakarta.
The default behavior of this method is to call |
public void | responseFlushBuffer()
Overrides jakarta.
The default behavior of this method is to call |
public void | responseReset()
Overrides jakarta.
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 jakarta.
The default behavior of this method is to call |
public void | setClientWindow(ClientWindow
the window associated with this request. window)Overrides jakarta.
The default behavior of this method is to call |
public void | setRequest(Object
the request object to be set. request)Overrides jakarta.
The default behavior of this method is to call |
public void | setRequestCharacterEncoding(String
the encoding name to be set. encoding)Overrides jakarta.
The default behavior of this method is to call |
public void | setResponse(Object
the response instance to be set. response)Overrides jakarta.
The default behavior of this method is to call |
public void | setResponseBufferSize(int
the new buffer size size)Overrides jakarta.
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 jakarta.
The default behavior of this method is to call |
public void | setResponseContentLength(int
the value to be set. length)Overrides jakarta.
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 jakarta.
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 jakarta.
The default behavior of this method is to call |
public void | setResponseStatus(int
an HTTP status code statusCode)Overrides jakarta.
The default behavior of this method is to call |
public void | setSessionMaxInactiveInterval(int
the value to be set. interval)Overrides jakarta.
The default behavior of this method is to call |