Class AbstractCompiledResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.SimpleResourceHandler
-
- org.ametys.plugins.core.ui.resources.AbstractCompiledResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Component
,Serviceable
- Direct Known Subclasses:
LessResourceHandler
,SassResourceHandler
,VueJsResourceHandler
public abstract class AbstractCompiledResourceHandler extends SimpleResourceHandler implements Component
Abstract reader for resources compiled during runtime, such as SASS or LESS files compiled into CSS.
-
-
Field Summary
-
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
-
Constructor Summary
Constructors Constructor Description AbstractCompiledResourceHandler(Source source)
Constructor with an already resolvedSource
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<String>
getDependenciesList(Source inputSource)
Calculate the list of dependencies for the given source, for validity calculations.Serializable
getKey()
Get the unique key for this resource, for cache purpose.SourceValidity
getValidity()
Get the resource validity, for cache purpose.-
Methods inherited from class org.ametys.core.resources.SimpleResourceHandler
generate, getLastModified, getMimeType, service, setup
-
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
-
-
-
-
Constructor Detail
-
AbstractCompiledResourceHandler
public AbstractCompiledResourceHandler(Source source)
Constructor with an already resolvedSource
.- Parameters:
source
- the source
-
-
Method Detail
-
getDependenciesList
protected abstract List<String> getDependenciesList(Source inputSource)
Calculate the list of dependencies for the given source, for validity calculations.- Parameters:
inputSource
- The source- Returns:
- The list of uri
-
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 classSimpleResourceHandler
- Returns:
- The cache key.
-
getValidity
public SourceValidity getValidity()
Description copied from interface:ResourceHandler
Get the resource validity, for cache purpose.- Specified by:
getValidity
in interfaceResourceHandler
- Overrides:
getValidity
in classSimpleResourceHandler
- Returns:
- The resource validity.
-
-