java.lang.Object
pro.verron.officestamper.core.StandardComment
- All Implemented Interfaces:
Comment
- Direct Known Subclasses:
CommentWrapper
CommentWrapper class.
- Since:
- 1.0.2
- Version:
- ${version}
- Author:
- Joseph Verron, Tom Hombergs
-
Constructor Summary
ConstructorsConstructorDescriptionStandardComment(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Constructs a new StandardComment object. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldchildren.org.docx4j.wml.Comments.CommentGetter for the fieldcomment.org.docx4j.wml.CommentRangeEndGetter for the fieldcommentRangeEnd.org.docx4j.wml.CommentRangeStartGetter for the fieldcommentRangeStart.org.docx4j.wml.R.CommentReferenceGetter for the fieldcommentReference.org.docx4j.openpackaging.packages.WordprocessingMLPackageRetrieves the WordprocessingMLPackage document.Retrieves the elements in the document that are between the comment range anchors.org.docx4j.wml.ContentAccessorgetParent.org.docx4j.openpackaging.packages.WordprocessingMLPackagegetSubTemplate(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Deprecated, for removal: This API element is subject to removal in a future version.voidsetChildren(Set<Comment> children) Sets the children of the comment.voidsetComment(org.docx4j.wml.Comments.Comment comment) Sets the comment for this object.voidsetCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd) Sets theCommentRangeEndobject associated with this comment.voidsetCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart) Sets the CommentRangeStart object associated with this comment.voidsetCommentReference(org.docx4j.wml.R.CommentReference commentReference) Sets the comment reference for this comment.org.docx4j.openpackaging.packages.WordprocessingMLPackagetryBuildingSubtemplate(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Deprecated, for removal: This API element is subject to removal in a future version.useCommentUtil.createSubWordDocument(Comment)insteadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pro.verron.officestamper.api.Comment
getRepeatElements
-
Constructor Details
-
StandardComment
public StandardComment(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Constructs a new StandardComment object.- Parameters:
document- the WordprocessingMLPackage document instance
-
-
Method Details
-
getParent
public org.docx4j.wml.ContentAccessor getParent()getParent.
-
getElements
Description copied from interface:CommentRetrieves the elements in the document that are between the comment range anchors.- Specified by:
getElementsin interfaceComment- Returns:
- the elements in the document that are between the comment range anchors.
-
getSubTemplate
@Deprecated(since="1.6.8", forRemoval=true) public org.docx4j.openpackaging.packages.WordprocessingMLPackage getSubTemplate(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.useCommentUtil.createSubWordDocument(Comment)insteadCreates a new document containing only the elements between the comment range anchors.- Specified by:
getSubTemplatein interfaceComment- Parameters:
document- the document from which to copy the elements.- Returns:
- a new document containing only the elements between the comment range anchors.
- Throws:
Exception- if the sub template could not be created.
-
tryBuildingSubtemplate
@Deprecated(since="1.6.8", forRemoval=true) public org.docx4j.openpackaging.packages.WordprocessingMLPackage tryBuildingSubtemplate(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Deprecated, for removal: This API element is subject to removal in a future version.useCommentUtil.createSubWordDocument(Comment)insteadCreates a new document containing only the elements between the comment range anchors. If the sub template could not be created, aOfficeStamperExceptionis thrown.- Specified by:
tryBuildingSubtemplatein interfaceComment- Parameters:
document- the document from which to copy the elements.- Returns:
- a new document containing only the elements between the comment range anchors.
-
getCommentRangeEnd
public org.docx4j.wml.CommentRangeEnd getCommentRangeEnd()Getter for the field
commentRangeEnd.- Specified by:
getCommentRangeEndin interfaceComment- Returns:
- a
CommentRangeEndobject
-
setCommentRangeEnd
public void setCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd) Description copied from interface:CommentSets theCommentRangeEndobject associated with this comment.- Specified by:
setCommentRangeEndin interfaceComment- Parameters:
commentRangeEnd- theCommentRangeEndobject to set
-
getCommentRangeStart
public org.docx4j.wml.CommentRangeStart getCommentRangeStart()Getter for the field
commentRangeStart.- Specified by:
getCommentRangeStartin interfaceComment- Returns:
- a
CommentRangeStartobject
-
setCommentRangeStart
public void setCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart) Description copied from interface:CommentSets the CommentRangeStart object associated with this comment.- Specified by:
setCommentRangeStartin interfaceComment- Parameters:
commentRangeStart- the CommentRangeStart object to set
-
getCommentReference
public org.docx4j.wml.R.CommentReference getCommentReference()Getter for the field
commentReference.- Specified by:
getCommentReferencein interfaceComment- Returns:
- a
R.CommentReferenceobject
-
setCommentReference
public void setCommentReference(org.docx4j.wml.R.CommentReference commentReference) Description copied from interface:CommentSets the comment reference for this comment.- Specified by:
setCommentReferencein interfaceComment- Parameters:
commentReference- the comment reference to set
-
getChildren
Getter for the field
children.- Specified by:
getChildrenin interfaceComment- Returns:
- a
Setobject
-
setChildren
Description copied from interface:CommentSets the children of the comment.- Specified by:
setChildrenin interfaceComment- Parameters:
children- the set of Comment objects representing the children of the comment
-
getComment
public org.docx4j.wml.Comments.Comment getComment()Getter for the field
comment.- Specified by:
getCommentin interfaceComment- Returns:
- a
Comments.Commentobject
-
setComment
public void setComment(org.docx4j.wml.Comments.Comment comment) Description copied from interface:CommentSets the comment for this object.- Specified by:
setCommentin interfaceComment- Parameters:
comment- the comment to set
-
getDocument
public org.docx4j.openpackaging.packages.WordprocessingMLPackage getDocument()Description copied from interface:CommentRetrieves the WordprocessingMLPackage document.- Specified by:
getDocumentin interfaceComment- Returns:
- the WordprocessingMLPackage document.
-
CommentUtil.createSubWordDocument(Comment)instead