Class UncompiledSassResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.AbstractResourceHandler
-
- org.ametys.plugins.core.ui.resources.css.sass.UncompiledSassResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Configurable
,Contextualizable
,Serviceable
public class UncompiledSassResourceHandler extends AbstractResourceHandler
Reader for uncompiled SASS files.
-
-
Field Summary
-
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 UncompiledSassResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Source
_getSource(String location)
void
generateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters)
Generate the resource configured during setup, and output itString
getMimeType(Source source, Parameters par)
Return the mime type of the configured resource.int
getPriority()
Get the priority of this handlervoid
service(ServiceManager manager)
Source
setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters)
Initialize the resource handler with a resource.-
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
-
-
-
-
Constructor Detail
-
UncompiledSassResourceHandler
public UncompiledSassResourceHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractResourceHandler
- Throws:
ServiceException
-
getPriority
public int getPriority()
Description copied from interface:ResourceHandler
Get the priority of this handler- Specified by:
getPriority
in interfaceResourceHandler
- Overrides:
getPriority
in classAbstractResourceHandler
- Returns:
- the priority. The bigger the highest priority
-
setup
public Source setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters) throws ProcessingException, IOException
Description copied from interface:ResourceHandler
Initialize the resource handler with a resource.- Specified by:
setup
in interfaceResourceHandler
- Overrides:
setup
in classAbstractResourceHandler
- Parameters:
location
- The source uriobjectModel
- The object modelpar
- The parametersadditionalParameters
- Additional parameters that can be filled, and will be transmitted to getKey, getValidity and generateResource- Returns:
- the resolved source
- Throws:
ProcessingException
- If an error occursIOException
- If an error occurs
-
_getSource
private Source _getSource(String location) throws MalformedURLException, IOException
- Throws:
MalformedURLException
IOException
-
getMimeType
public String getMimeType(Source source, Parameters par)
Description copied from interface:ResourceHandler
Return the mime type of the configured resource.- Specified by:
getMimeType
in interfaceResourceHandler
- Overrides:
getMimeType
in classAbstractResourceHandler
- Parameters:
source
- The sourcepar
- The parameters- Returns:
- The mime type.
-
generateResource
public void generateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters) throws IOException, ProcessingException
Description copied from interface:ResourceHandler
Generate the resource configured during setup, and output it- Parameters:
source
- The sourceout
- The output stream to write toobjectModel
- The object modelparameters
- The sitemap parametersadditionalParameters
- Additional parameters- Throws:
IOException
- If an error occursProcessingException
- If an error occurs
-
-