com.liferay.faces.bridge.context.internal
Class ExternalContextRichFacesBridgeImpl

java.lang.Object
  extended by javax.faces.context.ExternalContext
      extended by javax.faces.context.ExternalContextWrapper
          extended by com.liferay.faces.bridge.context.internal.ExternalContextRichFacesBridgeImpl
All Implemented Interfaces:
javax.faces.FacesWrapper<javax.faces.context.ExternalContext>

public class ExternalContextRichFacesBridgeImpl
extends javax.faces.context.ExternalContextWrapper

This class serves as a fix for FACES-2133 such that the getRequestPathInfo() and getRequestServletPath() methods work around an implicit servlet dependency in the a4j:mediaOutput component.

Author:
Kyle Stiemann

Field Summary
 
Fields inherited from class javax.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
ExternalContextRichFacesBridgeImpl(javax.faces.context.ExternalContext wrappedExternalContext)
           
 
Method Summary
 String getRequestPathInfo()
          When this method returns null, org.richfaces.resource.ResourceUtils#getMappingForRequest() assumes that the Faces Servlet URL mapping is extension based and strips the extension off the value returned by getRequestServletPath().
 String getRequestServletPath()
          This method returns "/rfRes/org.richfaces.resource.MediaOutputResource.faces" so that org.richfaces.resource.ResourceUtils#decodeResourceURL() will return "/rfRes/org.richfaces.resource.MediaOutputResource" to org.richfaces.resource.ResourceHandlerImpl#getResourcePathFromRequest() which will cause org.richfaces.resource.ResourceHandlerImpl to handle the resource in this request as a org.richfaces.resource.MediaOutputResource.
 javax.faces.context.ExternalContext getWrapped()
           
 
Methods inherited from class javax.faces.context.ExternalContextWrapper
addResponseCookie, addResponseHeader, dispatch, encodeActionURL, encodeBookmarkableURL, encodeNamespace, encodePartialActionURL, encodeRedirectURL, encodeResourceURL, getApplicationMap, getAuthType, getContext, getContextName, getFlash, getInitParameter, getInitParameterMap, getMimeType, getRealPath, getRemoteUser, getRequest, getRequestCharacterEncoding, getRequestContentLength, getRequestContentType, getRequestContextPath, getRequestCookieMap, getRequestHeaderMap, getRequestHeaderValuesMap, getRequestLocale, getRequestLocales, getRequestMap, getRequestParameterMap, getRequestParameterNames, getRequestParameterValuesMap, getRequestScheme, getRequestServerName, getRequestServerPort, getResource, getResourceAsStream, getResourcePaths, getResponse, getResponseBufferSize, getResponseCharacterEncoding, getResponseContentType, getResponseOutputStream, getResponseOutputWriter, getSession, getSessionMap, getUserPrincipal, invalidateSession, isResponseCommitted, isUserInRole, log, log, redirect, responseFlushBuffer, responseReset, responseSendError, setRequest, setRequestCharacterEncoding, setResponse, setResponseBufferSize, setResponseCharacterEncoding, setResponseContentLength, setResponseContentType, setResponseHeader, setResponseStatus
 
Methods inherited from class javax.faces.context.ExternalContext
getSessionMaxInactiveInterval, isSecure, setSessionMaxInactiveInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalContextRichFacesBridgeImpl

public ExternalContextRichFacesBridgeImpl(javax.faces.context.ExternalContext wrappedExternalContext)
Method Detail

getRequestPathInfo

public String getRequestPathInfo()
When this method returns null, org.richfaces.resource.ResourceUtils#getMappingForRequest() assumes that the Faces Servlet URL mapping is extension based and strips the extension off the value returned by getRequestServletPath(). This method always returns null to avoid adding code in this class to detect the actual Faces Servlet URL mapping since RichFaces never uses it.

Overrides:
getRequestPathInfo in class javax.faces.context.ExternalContextWrapper

getRequestServletPath

public String getRequestServletPath()
This method returns "/rfRes/org.richfaces.resource.MediaOutputResource.faces" so that org.richfaces.resource.ResourceUtils#decodeResourceURL() will return "/rfRes/org.richfaces.resource.MediaOutputResource" to org.richfaces.resource.ResourceHandlerImpl#getResourcePathFromRequest() which will cause org.richfaces.resource.ResourceHandlerImpl to handle the resource in this request as a org.richfaces.resource.MediaOutputResource.

Overrides:
getRequestServletPath in class javax.faces.context.ExternalContextWrapper

getWrapped

public javax.faces.context.ExternalContext getWrapped()
Specified by:
getWrapped in interface javax.faces.FacesWrapper<javax.faces.context.ExternalContext>
Overrides:
getWrapped in class javax.faces.context.ExternalContextWrapper


Copyright © 2015 Liferay, Inc.. All rights reserved.