Interface IXDocPreprocessor
- All Known Implementing Classes:
AbstractXDocPreprocessor,DOMPreprocessor,SAXXDocPreprocessor
public interface IXDocPreprocessor
XML document preprocessor is used to modify the content of the original document from the archive of the XML document
(odt, docx...). For instance loop management in table managed with
FieldsMetadata implements an
IXDocPreprocessor to add directive template engine (#foreach for velocity, [#list for freemarker) in the
table row.-
Method Summary
Modifier and TypeMethodDescriptionbooleancreate(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive outputArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) Create the XML file identify with te entry name from the archive.voidpreprocess(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive outputArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) Modify the XML file identify with te entry name from the archive.
-
Method Details
-
preprocess
void preprocess(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive outputArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) throws fr.opensagres.xdocreport.core.XDocReportException, IOExceptionModify the XML file identify with te entry name from the archive.- Parameters:
entryName- Zip entry name fo the XML file to modify.outputArchive- the zip of the XML document.fieldsMetadata- metdata fields.formater- used to generate directive template enginesharedContext- shared context between the whole processor to execute. This Map can be used to share information between processors (according the order of the processor registration).- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
create
boolean create(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive outputArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) throws fr.opensagres.xdocreport.core.XDocReportException, IOExceptionCreate the XML file identify with te entry name from the archive.- Parameters:
entryName- Zip entry name fo the XML file to modify.outputArchive- the zip of the XML document.fieldsMetadata- metdata fields.formater- used to generate directive template enginesharedContext- shared context between the whole processor to execute. This Map can be used to share information between processors (according the order of the processor registration).- Returns:
- true if processing can create entry and false otherwise.
- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-