Class BundleWriter
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriter
-
public class BundleWriter extends Object
The bundle-frontend. This class orchestrates the writing process. In the absence of template files, it will simply serialize the whole report into a XML file and will fail if there are non-serializable or unrecognized elements. Unlike the old ext-writer, this class does not try to write all report-definitions. The report definitions fed into this writer must use ElementType implementation to be written correctly. In this very first implementation, we ignore the global bundle and write everything into the target bundle. To make selective writing work, we have to tag each shared element as shared.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description BundleWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, MasterReport report)
void
writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, MasterReport report, org.pentaho.reporting.libraries.docbundle.DocumentBundle globalBundle)
static void
writeReportToDirectory(MasterReport report, File file)
static void
writeReportToZipFile(MasterReport report, File file)
static void
writeReportToZipFile(MasterReport report, String file)
static void
writeReportToZipStream(MasterReport report, OutputStream out)
static void
writeReportToZipStream(MasterReport report, OutputStream out, org.pentaho.reporting.libraries.docbundle.DocumentMetaData metaData)
void
writeSubReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, BundleWriterState state)
-
-
-
Method Detail
-
writeReport
public void writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, MasterReport report) throws IOException, BundleWriterException
- Throws:
IOException
BundleWriterException
-
writeReport
public void writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, MasterReport report, org.pentaho.reporting.libraries.docbundle.DocumentBundle globalBundle) throws IOException, BundleWriterException
- Throws:
IOException
BundleWriterException
-
writeSubReport
public void writeSubReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, BundleWriterState state) throws IOException, BundleWriterException
- Throws:
IOException
BundleWriterException
-
writeReportToZipFile
public static void writeReportToZipFile(MasterReport report, String file) throws BundleWriterException, org.pentaho.reporting.libraries.repository.ContentIOException, IOException
- Throws:
BundleWriterException
org.pentaho.reporting.libraries.repository.ContentIOException
IOException
-
writeReportToZipFile
public static void writeReportToZipFile(MasterReport report, File file) throws IOException, BundleWriterException, org.pentaho.reporting.libraries.repository.ContentIOException
- Throws:
IOException
BundleWriterException
org.pentaho.reporting.libraries.repository.ContentIOException
-
writeReportToZipStream
public static void writeReportToZipStream(MasterReport report, OutputStream out) throws IOException, BundleWriterException, org.pentaho.reporting.libraries.repository.ContentIOException
- Throws:
IOException
BundleWriterException
org.pentaho.reporting.libraries.repository.ContentIOException
-
writeReportToZipStream
public static void writeReportToZipStream(MasterReport report, OutputStream out, org.pentaho.reporting.libraries.docbundle.DocumentMetaData metaData) throws IOException, BundleWriterException, org.pentaho.reporting.libraries.repository.ContentIOException
- Throws:
IOException
BundleWriterException
org.pentaho.reporting.libraries.repository.ContentIOException
-
writeReportToDirectory
public static void writeReportToDirectory(MasterReport report, File file) throws IOException, BundleWriterException, org.pentaho.reporting.libraries.repository.ContentIOException
- Throws:
IOException
BundleWriterException
org.pentaho.reporting.libraries.repository.ContentIOException
-
-