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 void
generateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters)
Generate the resource configured during setup, and output itint
getPriority()
Get the priority of this handlerboolean
isSupported(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:ResourceHandler
Determines if the resource is supported by this handler- Specified by:
isSupported
in interfaceResourceHandler
- Overrides:
isSupported
in classAbstractResourceHandler
- Parameters:
source
- The uri of resource- Returns:
true
if the resource is supported
-
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
-
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- Specified by:
generateResource
in 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
-
-