Package org.docx4j.convert.out.common
Class AbstractExporter<CS extends AbstractConversionSettings,CC extends AbstractConversionContext,PK extends OpcPackage>
java.lang.Object
org.docx4j.convert.out.common.AbstractExporter<CS,CC,PK>
- All Implemented Interfaces:
Exporter<CS>
- Direct Known Subclasses:
AbstractWmlExporter
public abstract class AbstractExporter<CS extends AbstractConversionSettings,CC extends AbstractConversionContext,PK extends OpcPackage>
extends Object
implements Exporter<CS>
Exporter are responsible to create the environment for the export process.
They take care of the pre- and post processing (FORenderer).
The conversion process itself is done with the …ExporterDelegate
- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CCcreateContext(CS conversionSettings, PK preprocessedPackage, ConversionSectionWrappers sectionWrappers) protected OutputStreamcreateIntermediateOutputStream(OutputStream outputStream) protected abstract ConversionSectionWrapperscreateWrappers(CS conversionSettings, PK preprocessedPackage) voidexport(CS conversionSettings, OutputStream outputStream) protected longlogDebugStep(org.slf4j.Logger log, String stepLabel, long startTime) protected voidpostprocess(CS conversionSettings, AbstractConversionContext conversionContext, OutputStream intermediateOutputStream, OutputStream outputStream) protected abstract PKpreprocess(CS conversionSettings) protected abstract voidprocess(CS conversionSettings, CC conversionContext, OutputStream outputStream)
-
Field Details
-
LocalLog
protected static org.slf4j.Logger LocalLog
-
-
Constructor Details
-
AbstractExporter
protected AbstractExporter()
-
-
Method Details
-
export
- Specified by:
exportin interfaceExporter<CS extends AbstractConversionSettings>- Throws:
Docx4JException
-
logDebugStep
-
preprocess
- Parameters:
conversionSettings-- Returns:
- Throws:
Docx4JException
-
createWrappers
protected abstract ConversionSectionWrappers createWrappers(CS conversionSettings, PK preprocessedPackage) throws Docx4JException - Parameters:
conversionSettings-preprocessedPackage-- Returns:
- Throws:
Docx4JException
-
createContext
protected abstract CC createContext(CS conversionSettings, PK preprocessedPackage, ConversionSectionWrappers sectionWrappers) - Parameters:
conversionSettings-preprocessedPackage-sectionWrappers-- Returns:
-
createIntermediateOutputStream
protected OutputStream createIntermediateOutputStream(OutputStream outputStream) throws Docx4JException - Parameters:
outputStream-- Returns:
- Throws:
Docx4JException
-
process
protected abstract void process(CS conversionSettings, CC conversionContext, OutputStream outputStream) throws Docx4JException - Parameters:
conversionSettings-conversionContext-outputStream-- Throws:
Docx4JException
-
postprocess
protected void postprocess(CS conversionSettings, AbstractConversionContext conversionContext, OutputStream intermediateOutputStream, OutputStream outputStream) throws Docx4JException - Parameters:
conversionSettings-conversionContext-intermediateOutputStream-outputStream-- Throws:
Docx4JException
-