public abstract class AbstractGeneratedResourceHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.ehcache.Cache |
generatedResourceCache |
protected static org.apache.commons.logging.Log |
LOG |
protected StatisticsService |
statisticsService |
| Constructor and Description |
|---|
AbstractGeneratedResourceHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canHandle(String path) |
abstract org.springframework.core.io.Resource |
getFileContents(String path,
List<org.springframework.core.io.Resource> locations) |
protected net.sf.ehcache.Cache |
getGeneratedResourceCache() |
protected org.springframework.core.io.Resource |
getRawResource(String path,
List<org.springframework.core.io.Resource> locations)
This method can be used to read in a resource given a path and at least one resource location
|
org.springframework.core.io.Resource |
getResource(String path,
List<org.springframework.core.io.Resource> locations)
Attempts to retrive the requested resource from cache.
|
protected String |
getResourceContents(org.springframework.core.io.Resource resource) |
abstract boolean |
isCachedResourceExpired(GeneratedResource cachedResource,
String path,
List<org.springframework.core.io.Resource> locations) |
protected static final org.apache.commons.logging.Log LOG
protected StatisticsService statisticsService
protected net.sf.ehcache.Cache generatedResourceCache
public abstract boolean canHandle(String path)
path - public abstract org.springframework.core.io.Resource getFileContents(String path, List<org.springframework.core.io.Resource> locations)
path - locations - public abstract boolean isCachedResourceExpired(GeneratedResource cachedResource, String path, List<org.springframework.core.io.Resource> locations)
cachedResource - path - locations - public org.springframework.core.io.Resource getResource(String path, List<org.springframework.core.io.Resource> locations)
request - location - protected org.springframework.core.io.Resource getRawResource(String path, List<org.springframework.core.io.Resource> locations)
path - locations - protected String getResourceContents(org.springframework.core.io.Resource resource) throws IOException
resource - IOExceptionprotected net.sf.ehcache.Cache getGeneratedResourceCache()
Copyright © 2014. All Rights Reserved.