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 void
afterPropertiesSet()
Collection<String>
getAssets()
Collection<String>
getAssets(boolean minified)
static AssetLocator
getInstance()
long
getReloadMinutes()
Optional<AssetResource>
getResource(String assetName, String type)
Optional<AssetResource>
getResource(String assetName, String type, boolean minified)
protected org.springframework.core.io.Resource
getResource(String requestPath, List<? extends org.springframework.core.io.Resource> locations)
Optional<Collection<AssetResource>>
getResources(String assetName)
Optional<Collection<AssetResource>>
getResources(String assetName, boolean minified)
boolean
getUseMinified()
long
lastModified()
Optional<InputStream>
open(String assetName, String type)
Optional<InputStream>
open(String assetName, String type, boolean minified)
void
reload()
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)
protected String
resolveUrlPathInternal(String resourcePath, 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
-
-
-
-
Method Detail
-
getInstance
public static AssetLocator getInstance()
-
lastModified
public long lastModified()
- Specified by:
lastModified
in interfaceAssetLocator
-
getAssets
public Collection<String> getAssets()
- Specified by:
getAssets
in interfaceAssetLocator
-
getAssets
public Collection<String> getAssets(boolean minified)
- Specified by:
getAssets
in interfaceAssetLocator
-
getResources
public Optional<Collection<AssetResource>> getResources(String assetName)
- Specified by:
getResources
in interfaceAssetLocator
-
getResources
public Optional<Collection<AssetResource>> getResources(String assetName, boolean minified)
- Specified by:
getResources
in interfaceAssetLocator
-
getResource
public Optional<AssetResource> getResource(String assetName, String type)
- Specified by:
getResource
in interfaceAssetLocator
-
getResource
public Optional<AssetResource> getResource(String assetName, String type, boolean minified)
- Specified by:
getResource
in interfaceAssetLocator
-
open
public Optional<InputStream> open(String assetName, String type) throws IOException
- Specified by:
open
in interfaceAssetLocator
- Throws:
IOException
-
open
public Optional<InputStream> open(String assetName, String type, boolean minified) throws IOException
- Specified by:
open
in interfaceAssetLocator
- Throws:
IOException
-
reload
public void reload()
- Specified by:
reload
in interfaceAssetLocator
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in 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:
resolveResourceInternal
in 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:
resolveUrlPathInternal
in classorg.springframework.web.servlet.resource.AbstractResourceResolver
-
-