Package org.opennms.web.assets.impl
Class AssetLocatorImpl
- java.lang.Object
-
- org.springframework.web.servlet.resource.AbstractResourceResolver
-
- org.opennms.web.assets.impl.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
-
-
Constructor Summary
Constructors Constructor Description AssetLocatorImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Collection<String>getAssets()Collection<String>getAssets(boolean minified)static AssetLocatorgetInstance()longgetReloadMinutes()Optional<AssetResource>getResource(String assetName, String type)Optional<AssetResource>getResource(String assetName, String type, boolean minified)protected org.springframework.core.io.ResourcegetResource(String requestPath, List<? extends org.springframework.core.io.Resource> locations)Optional<Collection<AssetResource>>getResources(String assetName)Optional<Collection<AssetResource>>getResources(String assetName, boolean minified)booleangetUseMinified()longlastModified()Optional<InputStream>open(String assetName, String type)Optional<InputStream>open(String assetName, String type, boolean minified)voidreload()protected org.springframework.core.io.ResourceresolveResourceInternal(javax.servlet.http.HttpServletRequest request, String requestPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)protected StringresolveUrlPathInternal(String resourcePath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)voidsetReloadMinutes(long minutes)voidsetUseMinified(boolean minified)-
Methods inherited from class org.springframework.web.servlet.resource.AbstractResourceResolver
resolveResource, resolveUrlPath
-
-
-
-
Method Detail
-
getInstance
public static AssetLocator getInstance()
-
lastModified
public long lastModified()
- Specified by:
lastModifiedin interfaceAssetLocator
-
getAssets
public Collection<String> getAssets()
- Specified by:
getAssetsin interfaceAssetLocator
-
getAssets
public Collection<String> getAssets(boolean minified)
- Specified by:
getAssetsin interfaceAssetLocator
-
getResources
public Optional<Collection<AssetResource>> getResources(String assetName)
- Specified by:
getResourcesin interfaceAssetLocator
-
getResources
public Optional<Collection<AssetResource>> getResources(String assetName, boolean minified)
- Specified by:
getResourcesin interfaceAssetLocator
-
getResource
public Optional<AssetResource> getResource(String assetName, String type)
- Specified by:
getResourcein interfaceAssetLocator
-
getResource
public Optional<AssetResource> getResource(String assetName, String type, boolean minified)
- Specified by:
getResourcein interfaceAssetLocator
-
open
public Optional<InputStream> open(String assetName, String type) throws IOException
- Specified by:
openin interfaceAssetLocator- Throws:
IOException
-
open
public Optional<InputStream> open(String assetName, String type, boolean minified) throws IOException
- Specified by:
openin interfaceAssetLocator- Throws:
IOException
-
reload
public void reload()
- Specified by:
reloadin interfaceAssetLocator
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
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, String requestPath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)- Specified by:
resolveResourceInternalin classorg.springframework.web.servlet.resource.AbstractResourceResolver
-
getResource
protected org.springframework.core.io.Resource getResource(String requestPath, List<? extends org.springframework.core.io.Resource> locations)
-
resolveUrlPathInternal
protected String resolveUrlPathInternal(String resourcePath, List<? extends org.springframework.core.io.Resource> locations, org.springframework.web.servlet.resource.ResourceResolverChain chain)
- Specified by:
resolveUrlPathInternalin classorg.springframework.web.servlet.resource.AbstractResourceResolver
-
-