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 java.lang.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 Modifier and Type Field Description protected static org.slf4j.LoggerLocalLog -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractExporter() -
Method Summary
Modifier and Type Method Description protected abstract CCcreateContext(CS conversionSettings, PK preprocessedPackage, ConversionSectionWrappers sectionWrappers)protected java.io.OutputStreamcreateIntermediateOutputStream(java.io.OutputStream outputStream)protected abstract ConversionSectionWrapperscreateWrappers(CS conversionSettings, PK preprocessedPackage)voidexport(CS conversionSettings, java.io.OutputStream outputStream)protected longlogDebugStep(org.slf4j.Logger log, java.lang.String stepLabel, long startTime)protected voidpostprocess(CS conversionSettings, AbstractConversionContext conversionContext, java.io.OutputStream intermediateOutputStream, java.io.OutputStream outputStream)protected abstract PKpreprocess(CS conversionSettings)protected abstract voidprocess(CS conversionSettings, CC conversionContext, java.io.OutputStream outputStream)
-
Field Details
-
LocalLog
protected static org.slf4j.Logger LocalLog
-
-
Constructor Details
-
AbstractExporter
protected AbstractExporter()
-
-
Method Details
-
export
public void export(CS conversionSettings, java.io.OutputStream outputStream) throws Docx4JException- Specified by:
exportin interfaceExporter<CS extends AbstractConversionSettings>- Throws:
Docx4JException
-
logDebugStep
protected long logDebugStep(org.slf4j.Logger log, java.lang.String stepLabel, long startTime) -
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 java.io.OutputStream createIntermediateOutputStream(java.io.OutputStream outputStream) throws Docx4JException- Parameters:
outputStream-- Returns:
- Throws:
Docx4JException
-
process
protected abstract void process(CS conversionSettings, CC conversionContext, java.io.OutputStream outputStream) throws Docx4JException- Parameters:
conversionSettings-conversionContext-outputStream-- Throws:
Docx4JException
-
postprocess
protected void postprocess(CS conversionSettings, AbstractConversionContext conversionContext, java.io.OutputStream intermediateOutputStream, java.io.OutputStream outputStream) throws Docx4JException- Parameters:
conversionSettings-conversionContext-intermediateOutputStream-outputStream-- Throws:
Docx4JException
-