org.broadleafcommerce.common.web.resource
Class BroadleafResourceHttpRequestHandler

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.resource.ResourceHttpRequestHandler
                  extended by org.broadleafcommerce.common.web.resource.BroadleafResourceHttpRequestHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.HttpRequestHandler

public class BroadleafResourceHttpRequestHandler
extends org.springframework.web.servlet.resource.ResourceHttpRequestHandler


Field Summary
protected  ResourceBundlingService bundlingService
           
protected  List<AbstractGeneratedResourceHandler> handlers
           
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
BroadleafResourceHttpRequestHandler()
           
 
Method Summary
 List<AbstractGeneratedResourceHandler> getHandlers()
           
 List<org.springframework.core.io.Resource> getLocations()
           
protected  org.springframework.core.io.Resource getResource(javax.servlet.http.HttpServletRequest request)
          Checks to see if the requested path corresponds to a registered bundle.
 boolean isBundleRequest(javax.servlet.http.HttpServletRequest request)
           
 void setHandlers(List<AbstractGeneratedResourceHandler> handlers)
           
 
Methods inherited from class org.springframework.web.servlet.resource.ResourceHttpRequestHandler
afterPropertiesSet, getMediaType, handleRequest, isInvalidPath, setHeaders, setLocations, writeContent
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlers

protected List<AbstractGeneratedResourceHandler> handlers

bundlingService

protected ResourceBundlingService bundlingService
Constructor Detail

BroadleafResourceHttpRequestHandler

public BroadleafResourceHttpRequestHandler()
Method Detail

getResource

protected org.springframework.core.io.Resource getResource(javax.servlet.http.HttpServletRequest request)
Checks to see if the requested path corresponds to a registered bundle. If so, returns the generated bundle. Otherwise, checks to see if any of the configured GeneratedResourceHandlers can handle the given request. If neither of those cases match, delegates to the normal ResourceHttpRequestHandler

Overrides:
getResource in class org.springframework.web.servlet.resource.ResourceHttpRequestHandler

isBundleRequest

public boolean isBundleRequest(javax.servlet.http.HttpServletRequest request)

getLocations

public List<org.springframework.core.io.Resource> getLocations()
Returns:
a clone of the locations list that is in ResourceHttpRequestHandler. Note that we must use reflection to access this field as it is marked private.

getHandlers

public List<AbstractGeneratedResourceHandler> getHandlers()

setHandlers

public void setHandlers(List<AbstractGeneratedResourceHandler> handlers)


Copyright © 2013. All Rights Reserved.