Class DisplayIfProcessor
- java.lang.Object
-
- org.wickedsource.docxstamper.processor.BaseCommentProcessor
-
- org.wickedsource.docxstamper.processor.displayif.DisplayIfProcessor
-
- All Implemented Interfaces:
ICommentProcessor,IDisplayIfProcessor
public class DisplayIfProcessor extends BaseCommentProcessor implements IDisplayIfProcessor
-
-
Constructor Summary
Constructors Constructor Description DisplayIfProcessor()
-
Method Summary
All 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.voiddisplayParagraphIf(Boolean condition)May be called to delete the commented paragraph or not, depending on the given boolean condition.voiddisplayParagraphIfPresent(Object condition)May be called to delete the commented paragraph or not, depending on the presence of the given data.voiddisplayTableIf(Boolean condition)May be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.voiddisplayTableRowIf(Boolean condition)May be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.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
-
-
-
-
Method Detail
-
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
-
displayParagraphIf
public void displayParagraphIf(Boolean condition)
Description copied from interface:IDisplayIfProcessorMay be called to delete the commented paragraph or not, depending on the given boolean condition.- Specified by:
displayParagraphIfin interfaceIDisplayIfProcessor- Parameters:
condition- if true, the commented paragraph will remain in the document. If false, the commented paragraph will be deleted at stamping.
-
displayParagraphIfPresent
public void displayParagraphIfPresent(Object condition)
Description copied from interface:IDisplayIfProcessorMay be called to delete the commented paragraph or not, depending on the presence of the given data.- Specified by:
displayParagraphIfPresentin interfaceIDisplayIfProcessor- Parameters:
condition- if non null, the commented paragraph will remain in the document. If null, the commented paragraph will be deleted at stamping.
-
displayTableIf
public void displayTableIf(Boolean condition)
Description copied from interface:IDisplayIfProcessorMay be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.- Specified by:
displayTableIfin interfaceIDisplayIfProcessor- Parameters:
condition- if true, the table surrounding the commented paragraph will remain in the document. If false, the table will be deleted at stamping.
-
displayTableRowIf
public void displayTableRowIf(Boolean condition)
Description copied from interface:IDisplayIfProcessorMay be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.- Specified by:
displayTableRowIfin interfaceIDisplayIfProcessor- Parameters:
condition- if true, the table row surrounding the commented paragraph will remain in the document. If false, the table row will be deleted at stamping.
-
-