fr.opensagres.xdocreport.document.images
Interface IImageRegistry

All Known Implementing Classes:
AbstractImageRegistry, DocxImageRegistry, ODPImageRegistry, ODSImageRegistry, ODTImageRegistry, PPTXImageRegistry

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
static String GET_HEIGHT_METHOD
           
static String GET_PATH_METHOD
           
static String GET_WIDTH_METHOD
           
static String IMAGE_INFO
           
static String REGISTER_IMAGE_METHOD
           
 
Method Summary
 String getHeight(ImageProviderInfo info, String defaultHeight)
          Returns the height of the image provider if not null and the given defaultHeight otherwise.
 List<ImageProviderInfo> getImageProviderInfos()
          Returns list of image provider info.
 String getWidth(ImageProviderInfo info, String defaultWidth)
          Returns the width of the image provider if not null and the given defaultWidth otherwise.
 void postProcess()
          Called after processing of the template engine.
 void preProcess()
          Called before processing of the template engine.
 ImageProviderInfo registerImage(Object imageProvider, String fieldName, IContext context)
          Register the instance of imageProvider in the registry.
 

Field Detail

IMAGE_INFO

static final String IMAGE_INFO
See Also:
Constant Field Values

REGISTER_IMAGE_METHOD

static final String REGISTER_IMAGE_METHOD
See Also:
Constant Field Values

GET_WIDTH_METHOD

static final String GET_WIDTH_METHOD
See Also:
Constant Field Values

GET_HEIGHT_METHOD

static final String GET_HEIGHT_METHOD
See Also:
Constant Field Values

GET_PATH_METHOD

static final String GET_PATH_METHOD
See Also:
Constant Field Values
Method Detail

registerImage

ImageProviderInfo registerImage(Object imageProvider,
                                String fieldName,
                                IContext context)
                                throws 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:
XDocReportException
IOException

preProcess

void preProcess()
                throws XDocReportException
Called before processing of the template engine.

Throws:
XDocReportException

postProcess

void postProcess()
                 throws XDocReportException
Called 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:
XDocReportException

getImageProviderInfos

List<ImageProviderInfo> getImageProviderInfos()
Returns list of image provider info.

Returns:

getWidth

String getWidth(ImageProviderInfo info,
                String defaultWidth)
                throws IOException
Returns the width of the image provider if not null and the given defaultWidth otherwise.

Parameters:
imageProvider -
defaultWidth -
Returns:
Throws:
IOException

getHeight

String getHeight(ImageProviderInfo info,
                 String defaultHeight)
                 throws IOException
Returns the height of the image provider if not null and the given defaultHeight otherwise.

Parameters:
imageProvider -
defaultWidth -
Returns:
Throws:
IOException


Copyright © 2013. All rights reserved.