Package org.ametys.core.minimize
Class SourceMapCache
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.minimize.SourceMapCache
-
- All Implemented Interfaces:
LogEnabled,Initializable,Component,Serviceable
public class SourceMapCache extends AbstractLogEnabled implements Component, Serviceable, Initializable
A simple cache for source maps from files
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractCacheManager_cacheManagerCacheManager used to create and get cacheprotected SourceResolver_sourceResolverExcalibur source resolverstatic StringROLEThe avalon ROLE
-
Constructor Summary
Constructors Constructor Description SourceMapCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sourceget(String uri)Get a value from the cachevoidinitialize()voidput(String uri, String content, Long lastModified)Put a source map into the cachevoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_cacheManager
protected AbstractCacheManager _cacheManager
CacheManager used to create and get cache
-
_sourceResolver
protected SourceResolver _sourceResolver
Excalibur source resolver
-
-
Constructor Detail
-
SourceMapCache
public SourceMapCache()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
put
public void put(String uri, String content, Long lastModified) throws IOException
Put a source map into the cache- Parameters:
uri- The uri of the source mapcontent- The content of the source maplastModified- The last modified date of the source map- Throws:
IOException- If the uri is invalid
-
-