org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer
Interface BundleWriterHandler

All Known Implementing Classes:
BundleMetaFileWriter, ContentFileWriter, DataDefinitionFileWriter, DataSchemaWriter, LayoutFileWriter, ResourceWriter, SettingsFileWriter, StyleFileWriter

public interface BundleWriterHandler

A handler that writes a certain aspect into a own file. The name of file inside the bundle is returned as string. The file name returned is always absolute and can be made relative by using the IOUtils of LibBase. If the writer-handler did not generate a file on its own, it should return null.

Author:
Thomas Morgner

Method Summary
 int getProcessingOrder()
          Indicates an processing order for this BundleWriterHandler.
 String writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle, BundleWriterState state)
          Writes a certain aspect into a own file.
 

Method Detail

writeReport

String writeReport(org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle bundle,
                   BundleWriterState state)
                   throws IOException,
                          BundleWriterException
Writes a certain aspect into a own file. The name of file inside the bundle is returned as string. The file name returned is always absolute and can be made relative by using the IOUtils of LibBase. If the writer-handler did not generate a file on its own, it should return null.

Parameters:
bundle - the bundle where to write to.
state - the writer state to hold the current processing information.
Returns:
the name of the newly generated file or null if no file was created.
Throws:
IOException - if any error occured
BundleWriterException - if a bundle-management error occured.

getProcessingOrder

int getProcessingOrder()
Indicates an processing order for this BundleWriterHandler. The lower the order, the earlier in the writing process this BundleWriterHandler will be executed. This is important if the BundleWriterHandler does any kind of modifications to the report definition since that would need to be performed before the BundleWriterHandlers that perform the actual file creation based on the report definition.

These values are all relative to each other, so the first BundleWriterHandler processed will be the one which returns the lowest processing order.

Returns: