java.lang.Object
pro.verron.officestamper.api.AbstractCommentProcessor
- All Implemented Interfaces:
CommentProcessor
- Direct Known Subclasses:
BaseCommentProcessor
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
FieldsModifier and TypeFieldDescriptionprotected final ParagraphPlaceholderReplacerPlaceholderReplacer used to replace expressions in the comment text. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCommentProcessor(ParagraphPlaceholderReplacer placeholderReplacer) Creates an instance of AbstractCommentProcessor with the given ParagraphPlaceholderReplacer. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldcurrentCommentWrapper.org.docx4j.wml.RGetter for the fieldcurrentRun.org.docx4j.openpackaging.packages.WordprocessingMLPackageDeprecated, for removal: This API element is subject to removal in a future version.the document is passed to the processor through the commitChange method now and will probably pe passed through the constructor in the futureorg.docx4j.wml.PGetter for the fieldparagraph.voidsetCurrentCommentWrapper(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).voidsetCurrentRun(org.docx4j.wml.R run) Passes the run that is currently being processed (i.e., the run that is commented in the .docx template).voidsetDocument(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Deprecated, for removal: This API element is subject to removal in a future version.the document is passed to the processor through the commitChange method now, and will probably pe passed through the constructor in the futurevoidsetParagraph(org.docx4j.wml.P paragraph) Passes the paragraph that is currently being processed (i.e., the paragraph that is commented in the .docx template).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pro.verron.officestamper.api.CommentProcessor
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
Getter for the field
currentCommentWrapper.- Returns:
- a
Commentobject
-
setCurrentCommentWrapper
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:
setCurrentCommentWrapperin interfaceCommentProcessor- Parameters:
currentComment- of the currently processed comment within the template.
-
getParagraph
public org.docx4j.wml.P getParagraph()Getter for the field
paragraph.- Returns:
- a
Pobject
-
setParagraph
public void setParagraph(org.docx4j.wml.P paragraph) 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:
setParagraphin interfaceCommentProcessor- Parameters:
paragraph- coordinates of the currently processed paragraph within the template.
-
getCurrentRun
public org.docx4j.wml.R getCurrentRun()Getter for the field
currentRun.- Returns:
- a
Robject
-
setCurrentRun
public 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). This method is always called BEFORE the custom methods of the custom comment processor interface are called.- Specified by:
setCurrentRunin interfaceCommentProcessor- Parameters:
run- coordinates of the currently processed run within the template.
-
getDocument
@Deprecated(since="1.6.5", forRemoval=true) public org.docx4j.openpackaging.packages.WordprocessingMLPackage getDocument()Deprecated, for removal: This API element is subject to removal in a future version.the document is passed to the processor through the commitChange method now and will probably pe passed through the constructor in the futureGetter for the field
document.- Returns:
- a
WordprocessingMLPackageobject
-
setDocument
@Deprecated(since="1.6.5", forRemoval=true) public void setDocument(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Deprecated, for removal: This API element is subject to removal in a future version.the document is passed to the processor through the commitChange method now, and will probably pe passed through the constructor in the futurePasses the processed document, to make all linked data (images, etc.) available to processors that need it (example: repeatDocPart)- Specified by:
setDocumentin interfaceCommentProcessor- Parameters:
document- DocX template being processed.
-