Class SassSourceMapResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.DefaultResourceHandler
-
- org.ametys.plugins.core.ui.resources.css.sass.SassSourceMapResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Contextualizable
,Serviceable
public class SassSourceMapResourceHandler extends DefaultResourceHandler implements Contextualizable
Resource handler for source map of compiled sass files
-
-
Field Summary
Fields Modifier and Type Field Description private Context
_context
private JSASSResourceURIExtensionPoint
_jsassResourceURIExtensionPoint
private boolean
_minimize
private ProxiedContextPathProvider
_proxiedContextPathProvider
protected MinimizeSassManager
_sassMinimizeManager
sassMinimizeManagerprivate SourceMapCache
_sourceMapCache
private String
_sourceMapLocation
-
Fields inherited from class org.ametys.core.resources.DefaultResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
-
Constructor Summary
Constructors Constructor Description SassSourceMapResourceHandler()
CalledSassSourceMapResourceHandler(Source source)
If theSource
is already resolved by theResourceHandlerProvider
, it may provide it through the constructor to avoid resolving it again.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
void
generate(OutputStream out)
Generate the resource configured during setup, and output itSerializable
getKey()
Get the unique key for this resource, for cache purpose.void
service(ServiceManager manager)
Source
setup(String location, Map objectModel, Parameters parameters, boolean readForDownload)
Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.DefaultResourceHandler
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
-
_sassMinimizeManager
protected MinimizeSassManager _sassMinimizeManager
sassMinimizeManager
-
_minimize
private boolean _minimize
-
_sourceMapLocation
private String _sourceMapLocation
-
_sourceMapCache
private SourceMapCache _sourceMapCache
-
_jsassResourceURIExtensionPoint
private JSASSResourceURIExtensionPoint _jsassResourceURIExtensionPoint
-
_proxiedContextPathProvider
private ProxiedContextPathProvider _proxiedContextPathProvider
-
-
Constructor Detail
-
SassSourceMapResourceHandler
public SassSourceMapResourceHandler()
Called
-
SassSourceMapResourceHandler
public SassSourceMapResourceHandler(Source source)
If theSource
is already resolved by theResourceHandlerProvider
, it may provide it through the constructor to avoid resolving it again.- Parameters:
source
- the source.
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classDefaultResourceHandler
- Throws:
ServiceException
-
setup
public Source setup(String location, Map objectModel, Parameters parameters, 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 classDefaultResourceHandler
- Parameters:
location
- The source uriobjectModel
- The object modelparameters
- 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
-
getKey
public Serializable getKey()
Description copied from interface:ResourceHandler
Get the unique key for this resource, for cache purpose.- Specified by:
getKey
in interfaceResourceHandler
- Overrides:
getKey
in classDefaultResourceHandler
- Returns:
- The cache key.
-
generate
public void generate(OutputStream out) throws IOException, ProcessingException
Description copied from interface:ResourceHandler
Generate the resource configured during setup, and output it- Specified by:
generate
in interfaceResourceHandler
- Overrides:
generate
in classDefaultResourceHandler
- Parameters:
out
- The output stream to write to- Throws:
IOException
- If an error occursProcessingException
- If an error occurs
-
-