Class DocxFormatter
java.lang.Object
io.jmix.reports.yarg.formatters.impl.AbstractFormatter
io.jmix.reports.yarg.formatters.impl.DocxFormatter
- All Implemented Interfaces:
ReportFormatter
- Direct Known Subclasses:
JmixDocxFormatter
* Document formatter for '.docx' file types
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
AbstractFormatter.BandPathAndParameterName, AbstractFormatter.InlinerAndMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DocumentConverterprotected DocumentWrapperprotected HtmlImportProcessorprotected static final org.slf4j.Loggerprotected final Map<String, AbstractFormatter.BandPathAndParameterName> Band paths already resolved for the aliases of the template.protected org.docx4j.openpackaging.packages.WordprocessingMLPackageFields inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
ALIAS_GROUP, ALIAS_WITH_BAND_NAME_PATTERN, ALIAS_WITH_BAND_NAME_REGEXP, BAND_NAME_DECLARATION_PATTERN, BAND_NAME_DECLARATION_REGEXP, contentInliners, defaultFormatProvider, groovyFeatureSupport, groovyScriptParametersProvider, outputStream, outputType, reportTemplate, rootBand, scripting, STRING_FUNCTION_GROUP, supportedOutputTypes, UNIVERSAL_ALIAS_PATTERN, UNIVERSAL_ALIAS_REGEXP, VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidprotected voidprotected voidprotected booleanisSupportedMultilineText(org.docx4j.wml.Text text) protected voidvoidCreates document and serializes it to predefined stream (or something like this)protected voidprotected voidvoidsetDocumentConverter(DocumentConverter documentConverter) voidsetHtmlImportProcessor(HtmlImportProcessor htmlImportProcessor) protected booleantryToApplyInliners(String fullParameterName, Object paramValue, org.docx4j.wml.Text text) protected voidprotected voidwriteToOutputStream(org.docx4j.openpackaging.packages.WordprocessingMLPackage mlPackage, OutputStream outputStream) Methods inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
applyStringFunction, checkThreadInterrupted, containsJustOneAlias, createDocument, defaultFormat, findBandByPath, formatValue, formatValue, getAllAliases, getContentInlinerForFormat, getContentInliners, getCustomFormatter, getFormatString, getFullParameterName, getReportFieldFormat, hasFormat, inlineParameterValue, insertBandDataToString, isGroovyScript, setContentInliners, setDefaultFormatProvider, setScripting, unwrapParameterName, wrapWithReportingException, wrapWithReportingException
-
Field Details
-
log
protected static final org.slf4j.Logger log -
wordprocessingMLPackage
protected org.docx4j.openpackaging.packages.WordprocessingMLPackage wordprocessingMLPackage -
documentWrapper
-
documentConverter
-
htmlImportProcessor
-
resolvedBandPaths
Band paths already resolved for the aliases of the template. An alias of a field of the band being printed matches no band name, so resolving it walks the whole band tree, and a tabulated region meets the same aliases once per row of the report. The band tree does not change while the document is being rendered, so an alias always resolves to the same band path.
-
-
Constructor Details
-
DocxFormatter
-
-
Method Details
-
separateBandNameAndParameterName
- Overrides:
separateBandNameAndParameterNamein classAbstractFormatter
-
setDocumentConverter
-
setHtmlImportProcessor
-
renderDocument
public void renderDocument()Description copied from interface:ReportFormatterCreates document and serializes it to predefined stream (or something like this) -
updateTableOfContents
protected void updateTableOfContents() -
handleUrls
protected void handleUrls() -
handleMultilineTexts
protected void handleMultilineTexts() -
loadDocument
protected void loadDocument() -
saveAndClose
protected void saveAndClose() -
replaceAllAliasesInDocument
protected void replaceAllAliasesInDocument() -
fillTables
protected void fillTables() -
tryToApplyInliners
-
writeToOutputStream
protected void writeToOutputStream(org.docx4j.openpackaging.packages.WordprocessingMLPackage mlPackage, OutputStream outputStream) throws org.docx4j.openpackaging.exceptions.Docx4JException - Throws:
org.docx4j.openpackaging.exceptions.Docx4JException
-
convertAltChunks
public void convertAltChunks() throws org.docx4j.openpackaging.exceptions.Docx4JException- Throws:
org.docx4j.openpackaging.exceptions.Docx4JException
-
isSupportedMultilineText
protected boolean isSupportedMultilineText(org.docx4j.wml.Text text)
-