Package org.ametys.core.minimize
Class AbstractSourceMapResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.SimpleResourceHandler
-
- org.ametys.core.minimize.AbstractSourceMapResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Serviceable
- Direct Known Subclasses:
CSSSourceMapResourceHandler
,JSSourceMapResourceHandler
public abstract class AbstractSourceMapResourceHandler extends SimpleResourceHandler
Resource handler for source map files
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceMapCache
_sourceMapCache
SourceMapCache-
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_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 sourcevoid
service(ServiceManager manager)
Source
setup(String location, Map objectModel, Parameters par, boolean readForDownload)
Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.SimpleResourceHandler
generate, getKey, getLastModified, 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
acceptRanges, generate, getLength, 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:
service
in interfaceServiceable
- Overrides:
service
in classSimpleResourceHandler
- Throws:
ServiceException
-
setup
public Source setup(String location, Map objectModel, Parameters par, boolean readForDownload) throws IOException, ProcessingException
Description copied from interface:ResourceHandler
Initialize the resource handler with a resource.- Specified by:
setup
in interfaceResourceHandler
- Overrides:
setup
in classSimpleResourceHandler
- 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
-
-