Class AbstractJasperReportOutputFormat

    • Constructor Detail

      • AbstractJasperReportOutputFormat

        public AbstractJasperReportOutputFormat()
    • Method Detail

      • doExport

        protected abstract void doExport​(java.io.OutputStream outputStream,
                                         AbstractJasperReportOutputFormat.Print print)
                                  throws net.sf.jasperreports.engine.JRException,
                                         java.io.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
        java.io.IOException
      • print

        public final Processor.ExecutionContext print​(@Nonnull
                                                      java.util.Map<java.lang.String,​java.lang.String> mdcContext,
                                                      PJsonObject requestData,
                                                      Configuration config,
                                                      java.io.File configDir,
                                                      java.io.File taskDirectory,
                                                      java.io.OutputStream outputStream)
                                               throws java.lang.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:
        java.lang.Exception
      • getJasperPrint

        public final AbstractJasperReportOutputFormat.Print getJasperPrint​(@Nonnull
                                                                           java.util.Map<java.lang.String,​java.lang.String> mdcContext,
                                                                           PJsonObject requestData,
                                                                           Configuration config,
                                                                           java.io.File configDir,
                                                                           java.io.File taskDirectory)
                                                                    throws net.sf.jasperreports.engine.JRException,
                                                                           java.sql.SQLException,
                                                                           java.util.concurrent.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:
        java.util.concurrent.ExecutionException
        net.sf.jasperreports.engine.JRException
        java.sql.SQLException