Class BaseCommentProcessor
java.lang.Object
org.wickedsource.docxstamper.processor.BaseCommentProcessor
- All Implemented Interfaces:
ICommentProcessor
- Direct Known Subclasses:
DisplayIfProcessor,ParagraphRepeatProcessor,RepeatDocPartProcessor,RepeatProcessor,ReplaceWithProcessor,TableResolver
Base class for comment processors. The current run and paragraph are set by the
DocxStamper class.- Version:
- ${version}
- Author:
- Joseph Verron
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PlaceholderReplacerPlaceholderReplacer used to replace placeholders in the comment text. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseCommentProcessor(PlaceholderReplacer placeholderReplacer) Constructor for BaseCommentProcessor. -
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(CommentWrapper currentCommentWrapper) Passes the comment range wrapper that is currently being processed (i.e.voidsetCurrentRun(org.docx4j.wml.R run) Passes the run that is currently being processed (i.e.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wickedsource.docxstamper.api.commentprocessor.ICommentProcessor
commitChanges, reset
-
Field Details
-
placeholderReplacer
PlaceholderReplacer used to replace placeholders in the comment text.
-
-
Constructor Details
-
BaseCommentProcessor
Constructor for BaseCommentProcessor.
- Parameters:
placeholderReplacer- PlaceholderReplacer used to replace placeholders in the comment text.
-
-
Method Details
-
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 interfaceICommentProcessor- Parameters:
run- coordinates of the currently processed run within the template.
-
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 interfaceICommentProcessor- Parameters:
paragraph- coordinates of the currently processed paragraph within the template.
-
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 interfaceICommentProcessor- Parameters:
currentCommentWrapper- of the currently processed comment within the template.
-
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, in order to make all linked data (images, etc.) available to processors that need it (example : repeatDocPart)- Specified by:
setDocumentin interfaceICommentProcessor- Parameters:
document- DocX template being processed.
-
getCurrentCommentWrapper
Getter for the field
currentCommentWrapper.- Returns:
- a
CommentWrapperobject
-
getParagraph
public org.docx4j.wml.P getParagraph()Getter for the field
paragraph.- Returns:
- a
Pobject
-
getCurrentRun
public org.docx4j.wml.R getCurrentRun()Getter for the field
currentRun.- Returns:
- a
Robject
-
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
-