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
Resource handler for source map files
-
Field Summary
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) 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 Details
-
_sourceMapCache
SourceMapCache
-
-
Constructor Details
-
AbstractSourceMapResourceHandler
public AbstractSourceMapResourceHandler()
-
-
Method Details
-
service
- 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
Try to retrieve an existing source- Parameters:
location
- The location- Returns:
- The source, or null if not found
-