Class ParagraphRepeatProcessor
- java.lang.Object
-
- org.wickedsource.docxstamper.processor.BaseCommentProcessor
-
- org.wickedsource.docxstamper.processor.repeat.ParagraphRepeatProcessor
-
- All Implemented Interfaces:
ICommentProcessor,IParagraphRepeatProcessor
public class ParagraphRepeatProcessor extends BaseCommentProcessor implements IParagraphRepeatProcessor
-
-
Constructor Summary
Constructors Constructor Description ParagraphRepeatProcessor(TypeResolverRegistry typeResolverRegistry, DocxStamperConfiguration config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommitChanges(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 List<org.docx4j.wml.P>getParagraphsInsideComment(org.docx4j.wml.P paragraph)voidrepeatParagraph(List<Object> objects)May be called to mark a paragraph to be copied once for each element in the passed-in list.voidreset()Resets all state in the comment processor so that it can be re-used in another stamping process.-
Methods inherited from class org.wickedsource.docxstamper.processor.BaseCommentProcessor
getCurrentCommentWrapper, getCurrentParagraphCoordinates, getCurrentRunCoordinates, setCurrentCommentWrapper, setCurrentParagraphCoordinates, setCurrentRunCoordinates
-
-
-
-
Constructor Detail
-
ParagraphRepeatProcessor
public ParagraphRepeatProcessor(TypeResolverRegistry typeResolverRegistry, DocxStamperConfiguration config)
-
-
Method Detail
-
repeatParagraph
public void repeatParagraph(List<Object> objects)
Description copied from interface:IParagraphRepeatProcessorMay be called to mark a paragraph to be copied once for each element in the passed-in list. Within each copy of the row, all expressions are evaluated against one of the objects in the list.- Specified by:
repeatParagraphin interfaceIParagraphRepeatProcessor- Parameters:
objects- the objects which serve as context root for expressions found in the template table row.
-
commitChanges
public void commitChanges(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
Description copied from interface:ICommentProcessorThis 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 in the custom methods of a comment processor, the ongoing iteration over the paragraphs in the document may be disturbed.- Specified by:
commitChangesin interfaceICommentProcessor- Parameters:
document- The word document that can be manipulated by using the DOCX4J api.
-
reset
public void reset()
Description copied from interface:ICommentProcessorResets all state in the comment processor so that it can be re-used in another stamping process.- Specified by:
resetin interfaceICommentProcessor
-
getParagraphsInsideComment
public static List<org.docx4j.wml.P> getParagraphsInsideComment(org.docx4j.wml.P paragraph)
-
-