java.lang.Object
pro.verron.officestamper.api.AbstractCommentProcessor
- All Implemented Interfaces:
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 Summary
Modifier and TypeFieldDescriptionprotected final ParagraphPlaceholderReplacer
PlaceholderReplacer used to replace expressions in the comment text. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCommentProcessor
(ParagraphPlaceholderReplacer placeholderReplacer) Creates an instance of AbstractCommentProcessor with the given ParagraphPlaceholderReplacer. -
Method Summary
Modifier and TypeMethodDescriptionorg.docx4j.wml.R
void
setCurrentCommentWrapper
(Comment currentComment) Passes the comment range wrapper that is currently being processed (i.e., the start and end of comment that in the .docx template).void
setCurrentRun
(org.docx4j.wml.R run) Passes the run that is currently being processed (i.e., the run that is commented in the .docx template).void
setParagraph
(org.docx4j.wml.P paragraph) Deprecated, for removal: This API element is subject to removal in a future version.void
setParagraph
(Paragraph paragraph) void
setProcessorContext
(ProcessorContext processorContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pro.verron.officestamper.api.CommentProcessor
commitChanges, commitChanges, reset
-
Field Details
-
placeholderReplacer
PlaceholderReplacer used to replace expressions in the comment text.
-
-
Constructor Details
-
AbstractCommentProcessor
Creates an instance of AbstractCommentProcessor with the given ParagraphPlaceholderReplacer.- Parameters:
placeholderReplacer
- the ParagraphPlaceholderReplacer used to replace expressions in the comment text
-
-
Method Details
-
getCurrentCommentWrapper
-
setCurrentCommentWrapper
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 interfaceCommentProcessor
- Parameters:
currentComment
- of the currently processed comment within the template.
-
setProcessorContext
- Specified by:
setProcessorContext
in interfaceCommentProcessor
-
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 interfaceCommentProcessor
- Parameters:
run
- coordinates of the currently processed run within the template.
-
getParagraph
- Specified by:
getParagraph
in interfaceCommentProcessor
-
setParagraph
Deprecated, for removal: This API element is subject to removal in a future version.usesetParagraph(Paragraph)
insteadDescription 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 interfaceCommentProcessor
- Parameters:
paragraph
- coordinates of the currently processed paragraph within the template.
-
setParagraph
-
setParagraph(Paragraph)
instead