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 Details

  • 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.XDocReportException
      IOException
    • preProcess

      void preProcess() throws fr.opensagres.xdocreport.core.XDocReportException
      Called before processing of the template engine.
      Throws:
      fr.opensagres.xdocreport.core.XDocReportException
    • postProcess

      void postProcess() throws fr.opensagres.xdocreport.core.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:
      fr.opensagres.xdocreport.core.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