Package org.ametys.core.resources
Class ImageResourceHandler
- java.lang.Object
- 
- org.ametys.runtime.plugin.component.AbstractLogEnabled
- 
- org.ametys.core.resources.SimpleResourceHandler
- 
- org.ametys.core.resources.ImageResourceHandler
 
 
 
- 
- All Implemented Interfaces:
- ResourceHandler,- LogEnabled,- Serviceable
 - Direct Known Subclasses:
- PdfCoverResourceHandler
 
 public class ImageResourceHandler extends SimpleResourceHandler Resource handler for images
- 
- 
Field Summary- 
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
 
- 
 - 
Constructor SummaryConstructors Constructor Description ImageResourceHandler()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate(OutputStream out)Generate the resource configured during setup, and output itSerializablegetKey()Get the unique key for this resource, for cache purpose.Sourcesetup(String location, Map objectModel, Parameters par, boolean readForDownload)Initialize the resource handler with a resource.- 
Methods inherited from class org.ametys.core.resources.SimpleResourceHandlergetLastModified, getMimeType, getValidity, service
 - 
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.ametys.core.resources.ResourceHandleracceptRanges, generate, getLength, shouldUseSourceContentLength
 
- 
 
- 
- 
- 
Constructor Detail- 
ImageResourceHandlerpublic ImageResourceHandler() 
 
- 
 - 
Method Detail- 
setuppublic Source setup(String location, Map objectModel, Parameters par, boolean readForDownload) throws IOException, ProcessingException Description copied from interface:ResourceHandlerInitialize the resource handler with a resource.- Specified by:
- setupin interface- ResourceHandler
- Overrides:
- setupin class- SimpleResourceHandler
- Parameters:
- location- The source uri
- objectModel- The object model
- par- The parameters
- readForDownload- if the resource is to be downloaded and not rendered.
- Returns:
- the resolved source
- Throws:
- IOException- If an error occurs
- ProcessingException- If an error occurs
 
 - 
generatepublic void generate(OutputStream out) throws IOException, ProcessingException Description copied from interface:ResourceHandlerGenerate the resource configured during setup, and output it- Specified by:
- generatein interface- ResourceHandler
- Overrides:
- generatein class- SimpleResourceHandler
- Parameters:
- out- The output stream to write to
- Throws:
- IOException- If an error occurs
- ProcessingException- If an error occurs
 
 - 
getKeypublic Serializable getKey() Description copied from interface:ResourceHandlerGet the unique key for this resource, for cache purpose.- Specified by:
- getKeyin interface- ResourceHandler
- Overrides:
- getKeyin class- SimpleResourceHandler
- Returns:
- The cache key.
 
 
- 
 
-