Package org.craftercms.engine.controller
Class StaticAssetsRequestHandler
- java.lang.Object
-
- org.springframework.context.support.ApplicationObjectSupport
-
- org.springframework.web.context.support.WebApplicationObjectSupport
-
- org.springframework.web.servlet.support.WebContentGenerator
-
- org.springframework.web.servlet.resource.ResourceHttpRequestHandler
-
- org.craftercms.engine.controller.StaticAssetsRequestHandler
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.context.EmbeddedValueResolverAware
,org.springframework.web.context.ServletContextAware
,org.springframework.web.cors.CorsConfigurationSource
,org.springframework.web.HttpRequestHandler
public class StaticAssetsRequestHandler extends org.springframework.web.servlet.resource.ResourceHttpRequestHandler
Request handler to render static assets using theContentStoreService
as source.- Author:
- Alfonso Vásquez, Jose Ross
-
-
Constructor Summary
Constructors Constructor Description StaticAssetsRequestHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.craftercms.core.service.Content
getContent(SiteContext siteContext, String path)
protected String
getPath(javax.servlet.http.HttpServletRequest request, SiteContext siteContext)
protected org.springframework.core.io.Resource
getResource(javax.servlet.http.HttpServletRequest request)
protected void
init()
void
setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService)
void
setDisableCaching(boolean disableCaching)
void
setStaticAssetsPath(String staticAssetsPath)
protected org.springframework.core.io.Resource
toResource(org.craftercms.core.service.Content content, String path)
-
Methods inherited from class org.springframework.web.servlet.resource.ResourceHttpRequestHandler
afterPropertiesSet, getContentNegotiationManager, getCorsConfiguration, getLocations, getMediaType, getMediaTypes, getResourceHttpMessageConverter, getResourceRegionHttpMessageConverter, getResourceResolvers, getResourceTransformers, getUrlPathHelper, handleRequest, initAllowedLocations, initContentNegotiationStrategy, isInvalidPath, isOptimizeLocations, isUseLastModified, processPath, setContentNegotiationManager, setCorsConfiguration, setEmbeddedValueResolver, setHeaders, setLocations, setLocationValues, setMediaTypes, setOptimizeLocations, setResourceHttpMessageConverter, setResourceRegionHttpMessageConverter, setResourceResolvers, setResourceTransformers, setUrlPathHelper, setUseLastModified, toString
-
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeaders
-
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
-
-
-
-
Method Detail
-
init
protected void init()
-
setContentStoreService
public void setContentStoreService(org.craftercms.core.service.ContentStoreService contentStoreService)
-
setStaticAssetsPath
public void setStaticAssetsPath(String staticAssetsPath)
-
setDisableCaching
public void setDisableCaching(boolean disableCaching)
-
getResource
protected org.springframework.core.io.Resource getResource(javax.servlet.http.HttpServletRequest request)
- Overrides:
getResource
in classorg.springframework.web.servlet.resource.ResourceHttpRequestHandler
-
toResource
protected org.springframework.core.io.Resource toResource(org.craftercms.core.service.Content content, String path)
-
getPath
protected String getPath(javax.servlet.http.HttpServletRequest request, SiteContext siteContext)
-
getContent
protected org.craftercms.core.service.Content getContent(SiteContext siteContext, String path)
-
-