com.liferay.faces.bridge.context
Class ExternalContextCompat_2_0_Impl
java.lang.Object
javax.faces.context.ExternalContext
com.liferay.faces.bridge.context.ExternalContextCompat_1_2_Impl
com.liferay.faces.bridge.context.ExternalContextCompat_2_0_FlashImpl
com.liferay.faces.bridge.context.ExternalContextCompat_2_0_Impl
- Direct Known Subclasses:
- ExternalContextCompat_2_1_Impl
public abstract class ExternalContextCompat_2_0_Impl
- extends ExternalContextCompat_2_0_FlashImpl
This class provides a compatibility layer that isolates differences between JSF 1.2 and JSF 2.0.
- Author:
- Neil Griffin
| Fields inherited from class javax.faces.context.ExternalContext |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
|
Constructor Summary |
ExternalContextCompat_2_0_Impl(javax.portlet.PortletContext portletContext,
javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse)
|
|
Method Summary |
void |
addResponseCookie(String name,
String value,
Map<String,Object> properties)
|
void |
addResponseHeader(String name,
String value)
|
protected javax.servlet.http.Cookie |
createCookie(String name,
String value,
Map<String,Object> properties)
|
String |
encodeBookmarkableURL(String baseUrl,
Map<String,List<String>> parameters)
|
String |
encodePartialActionURL(String url)
|
String |
encodeRedirectURL(String baseUrl,
Map<String,List<String>> parameters)
|
String |
getContextName()
|
String |
getMimeType(String fileName)
|
String |
getRealPath(String path)
|
int |
getRequestContentLength()
|
String |
getRequestScheme()
|
String |
getRequestServerName()
|
int |
getRequestServerPort()
|
int |
getResponseBufferSize()
|
OutputStream |
getResponseOutputStream()
|
Writer |
getResponseOutputWriter()
|
void |
invalidateSession()
|
protected boolean |
isICEfacesLegacyMode(javax.portlet.ClientDataRequest clientDataRequest)
|
boolean |
isResponseCommitted()
|
void |
responseFlushBuffer()
|
void |
responseReset()
|
void |
responseSendError(int statusCode,
String message)
The Portlet API does not have an equivalent to HttpServletResponse.sendError(int, String). |
void |
setResponseBufferSize(int size)
|
void |
setResponseContentLength(int length)
|
void |
setResponseContentType(String contentType)
|
void |
setResponseHeader(String name,
String value)
|
void |
setResponseStatus(int statusCode)
Sets the status of the portlet response to the specified status code. |
| Methods inherited from class javax.faces.context.ExternalContext |
dispatch, encodeNamespace, encodeResourceURL, getApplicationMap, getAuthType, getContext, getInitParameter, getInitParameterMap, getRemoteUser, getRequest, getRequestCharacterEncoding, getRequestContentType, getRequestContextPath, getRequestCookieMap, getRequestHeaderMap, getRequestHeaderValuesMap, getRequestLocale, getRequestLocales, getRequestMap, getRequestParameterMap, getRequestParameterNames, getRequestParameterValuesMap, getRequestPathInfo, getRequestServletPath, getResource, getResourceAsStream, getResourcePaths, getResponse, getResponseCharacterEncoding, getResponseContentType, getSession, getSessionMap, getSessionMaxInactiveInterval, getUserPrincipal, isSecure, isUserInRole, log, log, redirect, setRequest, setRequestCharacterEncoding, setResponse, setResponseCharacterEncoding, setSessionMaxInactiveInterval |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
facesImplementationServletResponse
protected javax.servlet.ServletResponse facesImplementationServletResponse
portletPhase
protected Bridge.PortletPhase portletPhase
requestContextPath
protected String requestContextPath
ExternalContextCompat_2_0_Impl
public ExternalContextCompat_2_0_Impl(javax.portlet.PortletContext portletContext,
javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse)
addResponseCookie
public void addResponseCookie(String name,
String value,
Map<String,Object> properties)
- Overrides:
addResponseCookie in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#addResponseCookie(String, String, Map)}
addResponseHeader
public void addResponseHeader(String name,
String value)
- Overrides:
addResponseHeader in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#addResponseHeader(String, String)}
encodeBookmarkableURL
public String encodeBookmarkableURL(String baseUrl,
Map<String,List<String>> parameters)
- Overrides:
encodeBookmarkableURL in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#encodeBookmarkableURL(String, Map)}
encodePartialActionURL
public String encodePartialActionURL(String url)
- Overrides:
encodePartialActionURL in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#encodePartialActionURL(String)}
encodeRedirectURL
public String encodeRedirectURL(String baseUrl,
Map<String,List<String>> parameters)
- Overrides:
encodeRedirectURL in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#encodeRedirectURL(String, Map)}
invalidateSession
public void invalidateSession()
- Overrides:
invalidateSession in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#invalidateSession()}
responseFlushBuffer
public void responseFlushBuffer()
throws IOException
- Overrides:
responseFlushBuffer in class javax.faces.context.ExternalContext
- Throws:
IOException- Since:
- JSF 2.0
- See Also:
ExternalContext#responseFlushBuffer()}
responseReset
public void responseReset()
- Overrides:
responseReset in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#responseReset()}
responseSendError
public void responseSendError(int statusCode,
String message)
throws IOException
- The Portlet API does not have an equivalent to
HttpServletResponse.sendError(int, String). Since the
Mojarra JSF implementation basically only calls this when a Facelet is not found, better in a portlet environment
to simply log an error and throw an IOException up the call stack so that the portlet will give the portlet
container a chance to render an error message.
- Overrides:
responseSendError in class javax.faces.context.ExternalContext
- Throws:
IOException- Since:
- JSF 2.0
- See Also:
ExternalContext#responseSendError(int, String)}
createCookie
protected javax.servlet.http.Cookie createCookie(String name,
String value,
Map<String,Object> properties)
getContextName
public String getContextName()
- Overrides:
getContextName in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getContextName()}
isResponseCommitted
public boolean isResponseCommitted()
- Overrides:
isResponseCommitted in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#isResponseCommitted()}
isICEfacesLegacyMode
protected boolean isICEfacesLegacyMode(javax.portlet.ClientDataRequest clientDataRequest)
getMimeType
public String getMimeType(String fileName)
- Overrides:
getMimeType in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getMimeType(String)}
getRealPath
public String getRealPath(String path)
- Overrides:
getRealPath in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getRealPath(String)}
getRequestContentLength
public int getRequestContentLength()
- Overrides:
getRequestContentLength in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getRequestContentLength()}
getRequestScheme
public String getRequestScheme()
- Overrides:
getRequestScheme in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getRequestScheme()}
getRequestServerName
public String getRequestServerName()
- Overrides:
getRequestServerName in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getRequestServerName()}
getRequestServerPort
public int getRequestServerPort()
- Overrides:
getRequestServerPort in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getRequestServerPort()}
getResponseBufferSize
public int getResponseBufferSize()
- Overrides:
getResponseBufferSize in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#getResponseBufferSize()}
setResponseBufferSize
public void setResponseBufferSize(int size)
- Overrides:
setResponseBufferSize in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#setResponseBufferSize(int)}
setResponseContentLength
public void setResponseContentLength(int length)
- Overrides:
setResponseContentLength in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#setResponseContentLength(int)}
setResponseContentType
public void setResponseContentType(String contentType)
- Overrides:
setResponseContentType in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#setResponseContentType(String)}
setResponseHeader
public void setResponseHeader(String name,
String value)
- Overrides:
setResponseHeader in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#setResponseHeader(String, String)}
getResponseOutputStream
public OutputStream getResponseOutputStream()
throws IOException
- Overrides:
getResponseOutputStream in class javax.faces.context.ExternalContext
- Throws:
IOException- Since:
- JSF 2.0
- See Also:
ExternalContext#getResponseOutputStream()}
getResponseOutputWriter
public Writer getResponseOutputWriter()
throws IOException
- Overrides:
getResponseOutputWriter in class javax.faces.context.ExternalContext
- Throws:
IOException- Since:
- JSF 2.0
- See Also:
ExternalContext#getResponseOutputWriter()}
setResponseStatus
public void setResponseStatus(int statusCode)
- Sets the status of the portlet response to the specified status code. Note that this is only possible for a
portlet request of type PortletResponse because that is the only type of portlet response that is delivered
directly back to the client (without additional markup added by the portlet container).
- Overrides:
setResponseStatus in class javax.faces.context.ExternalContext
- Since:
- JSF 2.0
- See Also:
ExternalContext#setResponseStatus(int)}
Copyright © 2014 Liferay, Inc.. All Rights Reserved.