Package org.mapfish.print.output
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 java.lang.Object implements OutputFormat
The AbstractJasperReportOutputFormat class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractJasperReportOutputFormat.Print
The print information for doing the export.
-
Constructor Summary
Constructors Constructor Description AbstractJasperReportOutputFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doExport(java.io.OutputStream outputStream, AbstractJasperReportOutputFormat.Print print)
Export the report to the output stream.AbstractJasperReportOutputFormat.Print
getJasperPrint(java.util.Map<java.lang.String,java.lang.String> mdcContext, PJsonObject requestData, Configuration config, java.io.File configDir, java.io.File taskDirectory)
Renders the jasper report.Processor.ExecutionContext
print(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)
Performs the print and writes to the report in the correct format to the outputStream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mapfish.print.output.OutputFormat
getContentType, getFileSuffix
-
-
-
-
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 toprint
- 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 interfaceOutputFormat
- 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
-
-