Interface IImageRegistry
- All Known Implementing Classes:
AbstractImageRegistry
public interface IImageRegistry
Image registry used to store the
IImageProvider used in the "context", copy the binary data of the images in
the generated report, modify some entry of the generated report with image information.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetHeight(ImageProviderInfo info, String defaultHeight) Returns the height of the image provider if not null and the given defaultHeight otherwise.Returns list of image provider info.getWidth(ImageProviderInfo info, String defaultWidth) Returns the width of the image provider if not null and the given defaultWidth otherwise.voidCalled after processing of the template engine.voidCalled before processing of the template engine.registerImage(Object imageProvider, String fieldName, fr.opensagres.xdocreport.template.IContext context) Register the instance of imageProvider in the registry.
-
Field Details
-
IMAGE_INFO
- See Also:
-
REGISTER_IMAGE_METHOD
- See Also:
-
GET_WIDTH_METHOD
- See Also:
-
GET_HEIGHT_METHOD
- See Also:
-
GET_PATH_METHOD
- See Also:
-
-
Method Details
-
registerImage
ImageProviderInfo registerImage(Object imageProvider, String fieldName, fr.opensagres.xdocreport.template.IContext context) throws fr.opensagres.xdocreport.core.XDocReportException, IOException Register the instance of imageProvider in the registry. This done when context model is tracked while processing of the template engine.- Parameters:
imageProvider-- Returns:
- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
preProcess
void preProcess() throws fr.opensagres.xdocreport.core.XDocReportExceptionCalled before processing of the template engine.- Throws:
fr.opensagres.xdocreport.core.XDocReportException
-
postProcess
void postProcess() throws fr.opensagres.xdocreport.core.XDocReportExceptionCalled after processing of the template engine. In this step, list of image provider is populated. This method can be implemented to copy the binary data of the images in the generated report.- Throws:
fr.opensagres.xdocreport.core.XDocReportException
-
getImageProviderInfos
List<ImageProviderInfo> getImageProviderInfos()Returns list of image provider info.- Returns:
-
getWidth
Returns the width of the image provider if not null and the given defaultWidth otherwise.- Parameters:
imageProvider-defaultWidth-- Returns:
- Throws:
IOException
-
getHeight
Returns the height of the image provider if not null and the given defaultHeight otherwise.- Parameters:
imageProvider-defaultWidth-- Returns:
- Throws:
IOException
-