Class ProcessorCustomTest
java.lang.Object
pro.verron.officestamper.api.AbstractCommentProcessor
pro.verron.officestamper.test.ProcessorCustomTest
- All Implemented Interfaces:
CommentProcessor, ICustomCommentProcessor
public class ProcessorCustomTest
extends AbstractCommentProcessor
implements ICustomCommentProcessor
This is an example of a custom CommentProcessor
implementation.
Users of the docx-stamper library could use it to understand how they could leverage the library to create their own custom comment processors.
Specifically, it's designed to replace each paragraph that has been
commented with the annotation "visitParagraph" exposed by the
ICustomCommentProcessor.visitParagraph()
public method,
marking it with the text 'Visited' in the resultant stamped Word
document.
- Since:
- 1.6.6
- Version:
- ${version}
- Author:
- Joseph Verron
-
Field Summary
Fields inherited from class AbstractCommentProcessor
placeholderReplacer
-
Constructor Summary
ConstructorsConstructorDescriptionProcessorCustomTest
(ParagraphPlaceholderReplacer placeholderReplacer) Constructor for ProcessorCustomTest. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commitChanges
(DocxPart document) void
reset()
void
setCurrentCommentWrapper
(Comment comment) void
setCurrentRun
(org.docx4j.wml.R run) void
setParagraph
(Paragraph paragraph) void
visitParagraph.Methods inherited from class AbstractCommentProcessor
getCurrentCommentWrapper, getCurrentRun, getParagraph, setParagraph, setProcessorContext
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface CommentProcessor
commitChanges, getParagraph, setParagraph, setProcessorContext
-
Constructor Details
-
ProcessorCustomTest
Constructor for ProcessorCustomTest.- Parameters:
placeholderReplacer
- aParagraphPlaceholderReplacer
object
-
-
Method Details
-
commitChanges
- Specified by:
commitChanges
in interfaceCommentProcessor
-
reset
public void reset()- Specified by:
reset
in interfaceCommentProcessor
-
setCurrentCommentWrapper
- Specified by:
setCurrentCommentWrapper
in interfaceCommentProcessor
- Overrides:
setCurrentCommentWrapper
in classAbstractCommentProcessor
-
setParagraph
- Overrides:
setParagraph
in classAbstractCommentProcessor
-
setCurrentRun
public void setCurrentRun(org.docx4j.wml.R run) - Specified by:
setCurrentRun
in interfaceCommentProcessor
- Overrides:
setCurrentRun
in classAbstractCommentProcessor
-
visitParagraph
public void visitParagraph()visitParagraph.- Specified by:
visitParagraph
in interfaceICustomCommentProcessor
-