Module pro.verron.officestamper
Class TableResolver
java.lang.Object
pro.verron.officestamper.api.AbstractCommentProcessor
org.wickedsource.docxstamper.processor.BaseCommentProcessor
org.wickedsource.docxstamper.processor.table.TableResolver
- All Implemented Interfaces:
ITableResolver,CommentProcessor
TableResolver class.
- Since:
- 1.6.2
- Version:
- ${version}
- Author:
- Joseph Verron
-
Field Summary
Fields inherited from class pro.verron.officestamper.api.AbstractCommentProcessor
placeholderReplacer -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitChanges(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) This method is called after all comments in the .docx template have been passed to the comment processor.static CommentProcessorGenerate a newTableResolverinstance where value is replaced by an empty list whennullstatic CommentProcessornewInstance(PlaceholderReplacer pr, String nullReplacementValue) Deprecated, for removal: This API element is subject to removal in a future version.should be an internal implementation detailvoidreset()Resets all states in the comment processor so that it can be re-used in another stamping process.voidresolveTable(StampTable givenTable) Resolves the given table by manipulating the given table in the templateMethods inherited from class pro.verron.officestamper.api.AbstractCommentProcessor
getCurrentCommentWrapper, getCurrentRun, getDocument, getParagraph, setCurrentCommentWrapper, setCurrentRun, setDocument, setParagraph
-
Method Details
-
newInstance
@Deprecated(since="1.6.8", forRemoval=true) public static CommentProcessor newInstance(PlaceholderReplacer pr, String nullReplacementValue) Deprecated, for removal: This API element is subject to removal in a future version.should be an internal implementation detailGenerate a newTableResolverinstance- Parameters:
pr- aPlaceholderReplacerinstancenullReplacementValue- in case the value to interpret isnull- Returns:
- a new
TableResolverinstance
-
newInstance
Generate a newTableResolverinstance where value is replaced by an empty list whennull- Parameters:
pr- aPlaceholderReplacerinstance- Returns:
- a new
TableResolverinstance
-
resolveTable
Resolves the given table by manipulating the given table in the template- Specified by:
resolveTablein interfaceITableResolver- Parameters:
givenTable- the table to resolve.
-
commitChanges
public void commitChanges(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) This method is called after all comments in the .docx template have been passed to the comment processor. All manipulations of the .docx document SHOULD BE done in this method. If certain manipulations are already done within the custom methods of a comment processor, the ongoing iteration over the paragraphs in the document may be disturbed.- Specified by:
commitChangesin interfaceCommentProcessor- Parameters:
document- The Word document that can be manipulated by using the DOCX4J api.
-
reset
public void reset()Resets all states in the comment processor so that it can be re-used in another stamping process.- Specified by:
resetin interfaceCommentProcessor
-