Class AbstractCommentProcessor

java.lang.Object
pro.verron.officestamper.api.AbstractCommentProcessor
All Implemented Interfaces:
CommentProcessor

public abstract class AbstractCommentProcessor extends Object implements CommentProcessor
AbstractCommentProcessor is an abstract base class for comment processors. It implements the CommentProcessor interface. It provides common functionality and fields that subclasses can use.
  • Field Details

    • placeholderReplacer

      protected final ParagraphPlaceholderReplacer placeholderReplacer
      PlaceholderReplacer used to replace expressions in the comment text.
  • Constructor Details

    • AbstractCommentProcessor

      protected AbstractCommentProcessor(ParagraphPlaceholderReplacer placeholderReplacer)
      Creates an instance of AbstractCommentProcessor with the given ParagraphPlaceholderReplacer.
      Parameters:
      placeholderReplacer - the ParagraphPlaceholderReplacer used to replace expressions in the comment text
  • Method Details

    • getCurrentCommentWrapper

      public Comment getCurrentCommentWrapper()
    • setCurrentCommentWrapper

      public void setCurrentCommentWrapper(Comment currentComment)
      Description copied from interface: CommentProcessor
      Passes the comment range wrapper that is currently being processed (i.e., the start and end of comment that in the .docx template). This method is always called BEFORE the custom methods of the custom comment processor interface are called.
      Specified by:
      setCurrentCommentWrapper in interface CommentProcessor
      Parameters:
      currentComment - of the currently processed comment within the template.
    • setProcessorContext

      public void setProcessorContext(ProcessorContext processorContext)
      Specified by:
      setProcessorContext in interface CommentProcessor
    • getCurrentRun

      public org.docx4j.wml.R getCurrentRun()
    • setCurrentRun

      public void setCurrentRun(@Nullable org.docx4j.wml.R run)
      Description copied from interface: CommentProcessor
      Passes the run that is currently being processed (i.e., the run that is commented in the .docx template). This method is always called BEFORE the custom methods of the custom comment processor interface are called.
      Specified by:
      setCurrentRun in interface CommentProcessor
      Parameters:
      run - coordinates of the currently processed run within the template.
    • getParagraph

      public Paragraph getParagraph()
      Specified by:
      getParagraph in interface CommentProcessor
    • setParagraph

      @Deprecated(since="2.6", forRemoval=true) public void setParagraph(org.docx4j.wml.P paragraph)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: CommentProcessor
      Passes the paragraph that is currently being processed (i.e., the paragraph that is commented in the .docx template). This method is always called BEFORE the custom methods of the custom comment processor interface are called.
      Specified by:
      setParagraph in interface CommentProcessor
      Parameters:
      paragraph - coordinates of the currently processed paragraph within the template.
    • setParagraph

      public void setParagraph(Paragraph paragraph)