Class AbstractJasperReportOutputFormat

java.lang.Object
org.mapfish.print.output.AbstractJasperReportOutputFormat
All Implemented Interfaces:
OutputFormat
Direct Known Subclasses:
JasperReportExcelOutputFormat, JasperReportImageOutputFormat, JasperReportPDFOutputFormat, JasperReportSvgOutputFormat

public abstract class AbstractJasperReportOutputFormat extends Object implements OutputFormat
The AbstractJasperReportOutputFormat class.
  • Constructor Details

    • AbstractJasperReportOutputFormat

      public AbstractJasperReportOutputFormat()
  • Method Details

    • doExport

      protected abstract void doExport(OutputStream outputStream, AbstractJasperReportOutputFormat.Print print) throws net.sf.jasperreports.engine.JRException, IOException
      Export the report to the output stream.
      Parameters:
      outputStream - the output stream to export to
      print - the report
      Throws:
      net.sf.jasperreports.engine.JRException
      IOException
    • print

      public final Processor.ExecutionContext print(@Nonnull Map<String,String> mdcContext, PJsonObject requestData, Configuration config, File configDir, File taskDirectory, OutputStream outputStream) throws Exception
      Description copied from interface: OutputFormat
      Performs the print and writes to the report in the correct format to the outputStream.
      Specified by:
      print in interface OutputFormat
      Parameters:
      mdcContext - the MDC context for the current print job.
      requestData - the data from the client, required for writing.
      config - the configuration object representing the server side configuration.
      configDir - the directory that contains the configuration, used for resolving resources like images etc...
      taskDirectory - the temporary directory for this printing task.
      outputStream - the stream to write the result to
      Throws:
      Exception
    • getJasperPrint

      public final AbstractJasperReportOutputFormat.Print getJasperPrint(@Nonnull Map<String,String> mdcContext, PJsonObject requestData, Configuration config, File configDir, File taskDirectory) throws net.sf.jasperreports.engine.JRException, SQLException, ExecutionException
      Renders the jasper report.
      Parameters:
      mdcContext - the MDC context for the current print job.
      requestData - the data from the client, required for writing.
      config - the configuration object representing the server side configuration.
      configDir - the directory that contains the configuration, used for resolving resources like images etc...
      taskDirectory - the temporary directory for this printing task.
      Returns:
      a jasper print object which can be used to generate a PDF or other outputs.
      Throws:
      ExecutionException
      net.sf.jasperreports.engine.JRException
      SQLException