Class RemoteAssetsRequestHandler

  • 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 RemoteAssetsRequestHandler
    extends org.springframework.web.servlet.resource.ResourceHttpRequestHandler
    Request handler to render static assets that are stored externally from the content store, in remote file stores.
    Author:
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator

        HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POST
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String getPath​(javax.servlet.http.HttpServletRequest request)  
      protected org.springframework.core.io.Resource getResource​(javax.servlet.http.HttpServletRequest request)  
      protected void init()  
      void setDisableCaching​(boolean disableCaching)  
      void setRemoteFileResolver​(org.craftercms.commons.file.stores.RemoteFileResolver remoteFileResolver)  
      • 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
      • Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

        getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
    • Constructor Detail

      • RemoteAssetsRequestHandler

        public RemoteAssetsRequestHandler()
    • Method Detail

      • init

        protected void init()
      • setRemoteFileResolver

        public void setRemoteFileResolver​(org.craftercms.commons.file.stores.RemoteFileResolver remoteFileResolver)
      • setDisableCaching

        public void setDisableCaching​(boolean disableCaching)
      • getResource

        protected org.springframework.core.io.Resource getResource​(javax.servlet.http.HttpServletRequest request)
                                                            throws IOException
        Overrides:
        getResource in class org.springframework.web.servlet.resource.ResourceHttpRequestHandler
        Throws:
        IOException
      • getPath

        protected String getPath​(javax.servlet.http.HttpServletRequest request)