Class DisplayIfProcessor

    • Constructor Detail

      • DisplayIfProcessor

        public DisplayIfProcessor()
    • Method Detail

      • commitChanges

        public void commitChanges​(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
        Description copied from interface: ICommentProcessor
        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 in the custom methods of a comment processor, the ongoing iteration over the paragraphs in the document may be disturbed.
        Specified by:
        commitChanges in interface ICommentProcessor
        Parameters:
        document - The word document that can be manipulated by using the DOCX4J api.
      • reset

        public void reset()
        Description copied from interface: ICommentProcessor
        Resets all state in the comment processor so that it can be re-used in another stamping process.
        Specified by:
        reset in interface ICommentProcessor
      • displayParagraphIf

        public void displayParagraphIf​(Boolean condition)
        Description copied from interface: IDisplayIfProcessor
        May be called to delete the commented paragraph or not, depending on the given boolean condition.
        Specified by:
        displayParagraphIf in interface IDisplayIfProcessor
        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: IDisplayIfProcessor
        May be called to delete the commented paragraph or not, depending on the presence of the given data.
        Specified by:
        displayParagraphIfPresent in interface IDisplayIfProcessor
        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: IDisplayIfProcessor
        May be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.
        Specified by:
        displayTableIf in interface IDisplayIfProcessor
        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: IDisplayIfProcessor
        May be called to delete the table surrounding the commented paragraph, depending on the given boolean condition.
        Specified by:
        displayTableRowIf in interface IDisplayIfProcessor
        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.