Package org.ametys.core.minimize.js
Class JSSourceMapResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.AbstractResourceHandler
-
- org.ametys.core.minimize.AbstractSourceMapResourceHandler
-
- org.ametys.core.minimize.js.JSSourceMapResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Configurable
,Contextualizable
,Serviceable
public class JSSourceMapResourceHandler extends AbstractSourceMapResourceHandler
Resource handler for source map files
-
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
__LOCALE_PATTERN
protected MinimizeJSManager
_jSMinimizeManager
JS minimize manager-
Fields inherited from class org.ametys.core.minimize.AbstractSourceMapResourceHandler
_hashCache, _sourceMapCache
-
Fields inherited from class org.ametys.core.resources.AbstractResourceHandler
_cocoonContext, _context, _resolver, _supportedSuffixes
-
Fields inherited from interface org.ametys.core.resources.ResourceHandler
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description JSSourceMapResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Source
_generateJSSourceMap(Map objectModel, String localizedLocation)
protected Source
_getAlternateSource(String location, Map objectModel)
Find the source at an alternative locationprivate String
_getLocalizedLocation(String location)
void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.core.minimize.AbstractSourceMapResourceHandler
_getExistingSource, generateResource, getMimeType, getPriority, setup
-
Methods inherited from class org.ametys.core.resources.AbstractResourceHandler
configure, contextualize, getKey, getLastModified, getSize, getValidity, isSupported
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
__LOCALE_PATTERN
private static final Pattern __LOCALE_PATTERN
-
_jSMinimizeManager
protected MinimizeJSManager _jSMinimizeManager
JS minimize manager
-
-
Constructor Detail
-
JSSourceMapResourceHandler
public JSSourceMapResourceHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSourceMapResourceHandler
- Throws:
ServiceException
-
_getAlternateSource
protected Source _getAlternateSource(String location, Map objectModel) throws ProcessingException, IOException
Description copied from class:AbstractSourceMapResourceHandler
Find the source at an alternative location- Specified by:
_getAlternateSource
in classAbstractSourceMapResourceHandler
- Parameters:
location
- The original locationobjectModel
- The object model- Returns:
- The source, or null if not found
- Throws:
ProcessingException
- If an error occurredIOException
- If an error occurred
-
_getLocalizedLocation
private String _getLocalizedLocation(String location)
-
_generateJSSourceMap
private Source _generateJSSourceMap(Map objectModel, String localizedLocation) throws ProcessingException, IOException
- Throws:
ProcessingException
IOException
-
-