Package org.docx4j.model.fields.merge
Class MailMergerWithNext
java.lang.Object
org.docx4j.model.fields.merge.MailMerger
org.docx4j.model.fields.merge.MailMergerWithNext
-
Nested Class Summary
Nested classes/interfaces inherited from class org.docx4j.model.fields.merge.MailMerger
MailMerger.FormTextFieldNames, MailMerger.OutputField -
Field Summary
FieldsFields inherited from class org.docx4j.model.fields.merge.MailMerger
fieldFate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperform(WordprocessingMLPackage input, List<Object> contentList, List<Map<DataFieldName, String>> data, MailMerger.FormTextFieldNames formTextFieldNames) Perform the merge.static voidperformLabelMerge(WordprocessingMLPackage input, List<Map<DataFieldName, String>> data) Similar to performMerge method but better to merge labels template because of using the NEXT instruction to go to the next item.Methods inherited from class org.docx4j.model.fields.merge.MailMerger
canonicaliseStarts, extractInstr, getConsolidatedResultCrude, getConsolidatedResultCrude, getDatafieldNameFromInstr, getTextInsideContent, performMerge, recursiveRemove, removeSimpleField, setFormFieldProperties, setMERGEFIELDInOutput
-
Field Details
-
log
private static org.slf4j.Logger log
-
-
Constructor Details
-
MailMergerWithNext
public MailMergerWithNext()
-
-
Method Details
-
performLabelMerge
public static void performLabelMerge(WordprocessingMLPackage input, List<Map<DataFieldName, String>> data) throws Docx4JExceptionSimilar to performMerge method but better to merge labels template because of using the NEXT instruction to go to the next item. The contents of the input pkg are replaced with the results of the merge.- Parameters:
input- Document templatedata- List of multiple datamap- Throws:
Docx4JException
-
perform
private static List<Object> perform(WordprocessingMLPackage input, List<Object> contentList, List<Map<DataFieldName, String>> data, MailMerger.FormTextFieldNames formTextFieldNames) throws Docx4JExceptionPerform the merge. Recognize the NEXT instruction to go to the next data.- Parameters:
input-contentList-data- All datamap into a listformTextFieldNames-- Returns:
- Throws:
Docx4JException
-