org.wickedsource.docxstamper.processor.BaseCommentProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx-stamper Show documentation
Show all versions of docx-stamper Show documentation
Docx-stamper is a Java template engine for docx documents. This is a maintenance fork from
https://github.com/thombergs/docx-stamper.
The newest version!
package org.wickedsource.docxstamper.processor;
import org.wickedsource.docxstamper.api.commentprocessor.ICommentProcessor;
import org.wickedsource.docxstamper.api.coordinates.ParagraphCoordinates;
import org.wickedsource.docxstamper.api.coordinates.RunCoordinates;
import org.wickedsource.docxstamper.util.CommentWrapper;
import java.util.Objects;
public abstract class BaseCommentProcessor implements ICommentProcessor {
private ParagraphCoordinates currentParagraphCoordinates;
private RunCoordinates currentRunCoordinates;
private CommentWrapper currentCommentWrapper;
public RunCoordinates getCurrentRunCoordinates() {
return currentRunCoordinates;
}
@Override
public void setCurrentRunCoordinates(RunCoordinates currentRunCoordinates) {
this.currentRunCoordinates = currentRunCoordinates;
}
@Override
public void setCurrentParagraphCoordinates(ParagraphCoordinates coordinates) {
this.currentParagraphCoordinates = coordinates;
}
public ParagraphCoordinates getCurrentParagraphCoordinates() {
return currentParagraphCoordinates;
}
@Override
public void setCurrentCommentWrapper(CommentWrapper currentCommentWrapper) {
Objects.requireNonNull(currentCommentWrapper.getCommentRangeStart());
Objects.requireNonNull(currentCommentWrapper.getCommentRangeEnd());
this.currentCommentWrapper = currentCommentWrapper;
}
public CommentWrapper getCurrentCommentWrapper() {
return currentCommentWrapper;
}
}