@Override
public Download resolveDownload(Object result) throws IOException {
if(result instanceof Report) {
Report report = (Report) result;
ReportDownload download = new ReportDownload(report, resolver.getExportFormat(), resolver.doDownload());
download.setExporter(exporter);
return download;
}
if(result instanceof ReportDownload) {
ReportDownload download = (ReportDownload) result;
download.setExporter(exporter);
return download;
}
if(result instanceof ReportsDownload) {
ReportsDownload download = (ReportsDownload) result;
download.setExporter(exporter);
return download;
}
if(result instanceof BatchReportsDownload) {
BatchReportsDownload download = (BatchReportsDownload) result;
download.setExporter(exporter);
return download;
}
return super.resolveDownload(result);
}