Class AssetLocatorImpl

  • All Implemented Interfaces:
    AssetLocator, org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.resource.ResourceResolver

    public class AssetLocatorImpl
    extends org.springframework.web.servlet.resource.AbstractResourceResolver
    implements AssetLocator, org.springframework.beans.factory.InitializingBean
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.resource.AbstractResourceResolver

        logger
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      java.util.Collection<java.lang.String> getAssets()  
      java.util.Collection<java.lang.String> getAssets​(boolean minified)  
      static AssetLocator getInstance()  
      long getReloadMinutes()  
      java.util.Optional<AssetResource> getResource​(java.lang.String assetName, java.lang.String type)  
      java.util.Optional<AssetResource> getResource​(java.lang.String assetName, java.lang.String type, boolean minified)  
      protected org.springframework.core.io.Resource getResource​(java.lang.String requestPath, java.util.List<? extends org.springframework.core.io.Resource> locations)  
      java.util.Optional<java.util.Collection<AssetResource>> getResources​(java.lang.String assetName)  
      java.util.Optional<java.util.Collection<AssetResource>> getResources​(java.lang.String assetName, boolean minified)  
      boolean getUseMinified()  
      long lastModified()  
      java.util.Optional<java.io.InputStream> open​(java.lang.String assetName, java.lang.String type)  
      java.util.Optional<java.io.InputStream> open​(java.lang.String assetName, java.lang.String type, boolean minified)  
      void reload()  
      protected org.springframework.core.io.Resource resolveResourceInternal​(javax.servlet.http.HttpServletRequest request, java.lang.String requestPath, java.util.List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)  
      protected java.lang.String resolveUrlPathInternal​(java.lang.String resourcePath, java.util.List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)  
      void setReloadMinutes​(long minutes)  
      void setUseMinified​(boolean minified)  
      • Methods inherited from class org.springframework.web.servlet.resource.AbstractResourceResolver

        resolveResource, resolveUrlPath
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.web.servlet.resource.ResourceResolver

        resolveResource, resolveUrlPath
    • Constructor Detail

      • AssetLocatorImpl

        public AssetLocatorImpl()
    • Method Detail

      • getAssets

        public java.util.Collection<java.lang.String> getAssets()
        Specified by:
        getAssets in interface AssetLocator
      • getAssets

        public java.util.Collection<java.lang.String> getAssets​(boolean minified)
        Specified by:
        getAssets in interface AssetLocator
      • getResources

        public java.util.Optional<java.util.Collection<AssetResource>> getResources​(java.lang.String assetName,
                                                                                    boolean minified)
        Specified by:
        getResources in interface AssetLocator
      • getResource

        public java.util.Optional<AssetResource> getResource​(java.lang.String assetName,
                                                             java.lang.String type,
                                                             boolean minified)
        Specified by:
        getResource in interface AssetLocator
      • open

        public java.util.Optional<java.io.InputStream> open​(java.lang.String assetName,
                                                            java.lang.String type)
                                                     throws java.io.IOException
        Specified by:
        open in interface AssetLocator
        Throws:
        java.io.IOException
      • open

        public java.util.Optional<java.io.InputStream> open​(java.lang.String assetName,
                                                            java.lang.String type,
                                                            boolean minified)
                                                     throws java.io.IOException
        Specified by:
        open in interface AssetLocator
        Throws:
        java.io.IOException
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • getReloadMinutes

        public long getReloadMinutes()
      • setReloadMinutes

        public void setReloadMinutes​(long minutes)
      • getUseMinified

        public boolean getUseMinified()
      • setUseMinified

        public void setUseMinified​(boolean minified)
      • resolveResourceInternal

        protected org.springframework.core.io.Resource resolveResourceInternal​(javax.servlet.http.HttpServletRequest request,
                                                                               java.lang.String requestPath,
                                                                               java.util.List<? extends org.springframework.core.io.Resource> locations,
                                                                               org.springframework.web.servlet.resource.ResourceResolverChain chain)
        Specified by:
        resolveResourceInternal in class org.springframework.web.servlet.resource.AbstractResourceResolver
      • getResource

        protected org.springframework.core.io.Resource getResource​(java.lang.String requestPath,
                                                                   java.util.List<? extends org.springframework.core.io.Resource> locations)
      • resolveUrlPathInternal

        protected java.lang.String resolveUrlPathInternal​(java.lang.String resourcePath,
                                                          java.util.List<? extends org.springframework.core.io.Resource> locations,
                                                          org.springframework.web.servlet.resource.ResourceResolverChain chain)
        Specified by:
        resolveUrlPathInternal in class org.springframework.web.servlet.resource.AbstractResourceResolver