Package org.ametys.core.minimize
Class AbstractSourceMapResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.DefaultResourceHandler
-
- org.ametys.core.minimize.AbstractSourceMapResourceHandler
-
- All Implemented Interfaces:
ResourceHandler,LogEnabled,Serviceable
- Direct Known Subclasses:
CSSSourceMapResourceHandler,JSSourceMapResourceHandler
public abstract class AbstractSourceMapResourceHandler extends DefaultResourceHandler
Resource handler for source map files
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceMapCache_sourceMapCacheSourceMapCache-
Fields inherited from class org.ametys.core.resources.DefaultResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
-
Constructor Summary
Constructors Constructor Description AbstractSourceMapResourceHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Source_getAlternateSource(String location, Map objectModel)Find the source at an alternative locationprotected Source_getExistingSource(String location)Try to retrieve an existing sourcevoidservice(ServiceManager manager)Sourcesetup(String location, Map objectModel, Parameters par, boolean readForDownload)Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.DefaultResourceHandler
generate, getKey, getLastModified, getLength, getMimeType, getValidity
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.core.resources.ResourceHandler
shouldUseSourceContentLength
-
-
-
-
Field Detail
-
_sourceMapCache
protected SourceMapCache _sourceMapCache
SourceMapCache
-
-
Constructor Detail
-
AbstractSourceMapResourceHandler
public AbstractSourceMapResourceHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classDefaultResourceHandler- Throws:
ServiceException
-
setup
public Source setup(String location, Map objectModel, Parameters par, boolean readForDownload) throws IOException, ProcessingException
Description copied from interface:ResourceHandlerInitialize the resource handler with a resource.- Specified by:
setupin interfaceResourceHandler- Overrides:
setupin classDefaultResourceHandler- Parameters:
location- The source uriobjectModel- The object modelpar- The parametersreadForDownload- if the resource is to be downloaded and not rendered.- Returns:
- the resolved source
- Throws:
IOException- If an error occursProcessingException- If an error occurs
-
_getAlternateSource
protected abstract Source _getAlternateSource(String location, Map objectModel) throws ProcessingException, IOException
Find the source at an alternative location- Parameters:
location- The original locationobjectModel- The object model- Returns:
- The source, or null if not found
- Throws:
IOException- If an error occurredProcessingException- If an error occurred
-
_getExistingSource
protected Source _getExistingSource(String location)
Try to retrieve an existing source- Parameters:
location- The location- Returns:
- The source, or null if not found
-
-