public class JasperReportDownload
extends de.cismet.tools.gui.downloadmanager.AbstractCancellableDownload
JasperDownload, as the
DownloadManager opens immediately. The datasource and parameters are created via the strategy pattern, which is
realized with the two interfaces JasperReportParametersGenerator and JasperReportDataSourceGenerator. A concrete
class of these interfaces contains the knowledge of creating the datasource or the parameters. These concrete classes
are run in the run()-method of JasperReportDownload and therefor create the datasource or parameters after the
download itself has been added to the download manager. Another point is that the creation of the JasperPrint is also
time-consuming, with this implementation it has to be created in the download, this was not necessary in
JasperDownload.
Note 1: the creation of the datasource and the parameters will not run in the EDT.
Note 2: the datasource will be created before the parameters
| Modifier and Type | Class and Description |
|---|---|
static interface |
JasperReportDownload.JasperReportDataSourceGenerator
DOCUMENT ME!
|
static interface |
JasperReportDownload.JasperReportParametersGenerator
DOCUMENT ME!
|
| Constructor and Description |
|---|
JasperReportDownload(net.sf.jasperreports.engine.JasperReport reportResource,
JasperReportDownload.JasperReportParametersGenerator parametersGenerator,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename)
Creates a new AnotherJasperDownload object.
|
JasperReportDownload(String reportResourceName,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename)
Creates a new AnotherJasperDownload object.
|
JasperReportDownload(String reportResourceName,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename,
String extension)
Creates a new JasperReportDownload object.
|
JasperReportDownload(String reportResourceName,
JasperReportDownload.JasperReportParametersGenerator parametersGenerator,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename)
Creates a new AnotherJasperDownload object.
|
JasperReportDownload(String reportResourceName,
Map parameters,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename)
Creates a new AnotherJasperDownload object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
exportReportFile(net.sf.jasperreports.engine.JasperPrint print,
File fileToSaveTo)
DOCUMENT ME!
|
void |
run() |
compareTo, determineDestinationFile, equals, error, getCaughtException, getDownloadsCompleted, getDownloadsErroneous, getDownloadsTotal, getExceptionPanel, getFileToSaveTo, getStatus, getTitle, hashCode, setParallelDownloads, startDownload, stateChanged, titleChangedaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic JasperReportDownload(String reportResourceName, JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator, String directory, String title, String filename)
reportResourceName - report DOCUMENT ME!dataSourceGenerator - DOCUMENT ME!directory - DOCUMENT ME!title - DOCUMENT ME!filename - DOCUMENT ME!public JasperReportDownload(String reportResourceName, JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator, String directory, String title, String filename, String extension)
reportResourceName - DOCUMENT ME!dataSourceGenerator - DOCUMENT ME!directory - DOCUMENT ME!title - DOCUMENT ME!filename - DOCUMENT ME!extension - DOCUMENT ME!public JasperReportDownload(String reportResourceName, Map parameters, JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator, String directory, String title, String filename)
reportResourceName - report DOCUMENT ME!parameters - DOCUMENT ME!dataSourceGenerator - DOCUMENT ME!directory - DOCUMENT ME!title - DOCUMENT ME!filename - DOCUMENT ME!public JasperReportDownload(String reportResourceName, JasperReportDownload.JasperReportParametersGenerator parametersGenerator, JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator, String directory, String title, String filename)
reportResourceName - report DOCUMENT ME!parametersGenerator - DOCUMENT ME!dataSourceGenerator - DOCUMENT ME!directory - DOCUMENT ME!title - DOCUMENT ME!filename - DOCUMENT ME!public JasperReportDownload(net.sf.jasperreports.engine.JasperReport reportResource,
JasperReportDownload.JasperReportParametersGenerator parametersGenerator,
JasperReportDownload.JasperReportDataSourceGenerator dataSourceGenerator,
String directory,
String title,
String filename)
reportResource - report DOCUMENT ME!parametersGenerator - DOCUMENT ME!dataSourceGenerator - DOCUMENT ME!directory - DOCUMENT ME!title - DOCUMENT ME!filename - DOCUMENT ME!public void run()
protected void exportReportFile(net.sf.jasperreports.engine.JasperPrint print,
File fileToSaveTo)
throws net.sf.jasperreports.engine.JRException
print - DOCUMENT ME!fileToSaveTo - DOCUMENT ME!net.sf.jasperreports.engine.JRException - DOCUMENT ME!Copyright © 2012–2025 cismet GmbH. All rights reserved.