Class AbstractXDocPreprocessor<T>
java.lang.Object
fr.opensagres.xdocreport.document.preprocessor.AbstractXDocPreprocessor<T>
- All Implemented Interfaces:
IXDocPreprocessor
- Direct Known Subclasses:
DOMPreprocessor,SAXXDocPreprocessor
Abstract class for
IXDocPreprocessor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcloseSource(T reader) booleancreate(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.protected voidcreateAndProcess(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, InputStream input) protected abstract Tvoidpreprocess(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive documentArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formater, Map<String, Object> sharedContext) Modify the XML file identify with te entry name from the archive.abstract booleanpreprocess(String entryName, T reader, Writer writer, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formater, Map<String, Object> context)
-
Constructor Details
-
AbstractXDocPreprocessor
public AbstractXDocPreprocessor()
-
-
Method Details
-
preprocess
public void preprocess(String entryName, fr.opensagres.xdocreport.core.io.XDocArchive documentArchive, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formater, Map<String, Object> sharedContext) throws fr.opensagres.xdocreport.core.XDocReportException, IOExceptionDescription copied from interface:IXDocPreprocessorModify the XML file identify with te entry name from the archive.- Specified by:
preprocessin interfaceIXDocPreprocessor- Parameters:
entryName- Zip entry name fo the XML file to modify.documentArchive- the zip of the XML document.fieldsMetadata- metdata fields.sharedContext- 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
-
closeSource
protected abstract void closeSource(T reader) throws fr.opensagres.xdocreport.core.XDocReportException, IOException - Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
create
public 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, IOExceptionDescription copied from interface:IXDocPreprocessorCreate the XML file identify with te entry name from the archive.- Specified by:
createin interfaceIXDocPreprocessor- Parameters:
entryName- Zip entry name fo the XML file to modify.outputArchive- the zip of the XML document.fieldsMetadata- metdata fields.sharedContext- 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
-
createAndProcess
protected void createAndProcess(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, InputStream input) throws IOException, fr.opensagres.xdocreport.core.XDocReportException- Throws:
IOExceptionfr.opensagres.xdocreport.core.XDocReportException
-
preprocess
public abstract boolean preprocess(String entryName, T reader, Writer writer, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formater, Map<String, Object> context) throws fr.opensagres.xdocreport.core.XDocReportException, IOException- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
getSource
protected abstract T getSource(fr.opensagres.xdocreport.core.io.XDocArchive documentArchive, String entryName) throws fr.opensagres.xdocreport.core.XDocReportException, IOException - Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-