Package org.ametys.core.resources
Class DefaultResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.AbstractResourceHandler
-
- org.ametys.core.resources.DefaultResourceHandler
-
- All Implemented Interfaces:
ResourceHandler,LogEnabled,Component,Configurable,Contextualizable,Serviceable
public class DefaultResourceHandler extends AbstractResourceHandler implements Component
Default resource handler
-
-
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 DefaultResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters)Generate the resource configured during setup, and output itintgetPriority()Get the priority of this handlerbooleanisSupported(String source)Determines if the resource is supported by this handler-
Methods inherited from class org.ametys.core.resources.AbstractResourceHandler
configure, contextualize, getKey, getLastModified, getMimeType, getSize, getValidity, service, setup
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
DefaultResourceHandler
public DefaultResourceHandler()
-
-
Method Detail
-
isSupported
public boolean isSupported(String source)
Description copied from interface:ResourceHandlerDetermines if the resource is supported by this handler- Specified by:
isSupportedin interfaceResourceHandler- Overrides:
isSupportedin classAbstractResourceHandler- Parameters:
source- The uri of resource- Returns:
trueif the resource is supported
-
getPriority
public int getPriority()
Description copied from interface:ResourceHandlerGet the priority of this handler- Specified by:
getPriorityin interfaceResourceHandler- Overrides:
getPriorityin classAbstractResourceHandler- Returns:
- the priority. The bigger the highest priority
-
generateResource
public void generateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters) throws IOException, ProcessingException
Description copied from interface:ResourceHandlerGenerate the resource configured during setup, and output it- Specified by:
generateResourcein interfaceResourceHandler- 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
-
-