Interface ReviewController
-
- All Superinterfaces:
AuthorChangeTrackingController
,AuthorReviewerNameController
,ChangeTrackingController
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface ReviewController extends AuthorChangeTrackingController, AuthorReviewerNameController
Provides support for marker related actions (accept/reject tracked changes, add/edit comments, edit author name etc.).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addComment(int startOffset, int endOffset, java.lang.String comment)
Adds a comment marker at given offsets.boolean
addCommentOnSelection(int startOffset, int endOffset, java.lang.String comment)
Add comment on a selection.AuthorPersistentHighlight
addPersistentMarker(AuthorPersistentHighlight.PersistentHighlightType type, int startOffset, int endOffset, java.util.Map<java.lang.String,java.lang.String> properties)
Add comment on a selection.void
addReply(java.lang.String replyComment, AuthorPersistentHighlight parentHighlight)
Adds a reply to the specified highlight.void
addReply(java.util.Map<java.lang.String,java.lang.String> properties, AuthorPersistentHighlight parentHighlight)
Adds a reply to the specified highlight.void
editComment(AuthorPersistentHighlight highlight, java.lang.String newComment)
Edits the comment of a marker (comment and tracked change).java.util.List<AuthorPersistentHighlight>
getAllHighlights()
java.lang.Integer
getAuthorNumber(java.lang.String author)
Returns a number representing the author number.void
removeComment(AuthorPersistentHighlight highlight)
Removes a comment marker.void
toggleMarkAsDone(AuthorPersistentHighlight highlight)
Toggle the "done" state of the specified highlight.-
Methods inherited from interface ro.sync.ecss.extensions.api.AuthorReviewerNameController
getReviewerAuthorName, setReviewerAuthorName
-
Methods inherited from interface ro.sync.ecss.extensions.api.ChangeTrackingController
accept, accept, acceptSelection, getAttributeChangeHighlights, getChangeHighlights, getChangeHighlights, isTrackingChanges, reject, reject, rejectSelection, toggleTrackChanges
-
-
-
-
Method Detail
-
toggleMarkAsDone
void toggleMarkAsDone(AuthorPersistentHighlight highlight)
Toggle the "done" state of the specified highlight. This state is also applied to all its replies. The highlight can one of the following types: For other types, this method does nothing.- Parameters:
highlight
- The highlight to toggle the done state for.- Since:
- 18
-
addReply
void addReply(java.lang.String replyComment, AuthorPersistentHighlight parentHighlight)
Adds a reply to the specified highlight. If the highlight is the last child of its parent, the reply is added to the parent highlight instead. The parent highlight can one of the following types:AuthorPersistentHighlight.PersistentHighlightType.CHANGE_INSERT
AuthorPersistentHighlight.PersistentHighlightType.CHANGE_DELETE
AuthorPersistentHighlight.PersistentHighlightType.COMMENT
When the first reply is added to a highlight, a new property is set to this highlight:AuthorPersistentHighlightConstants.COMMENT_ID
. All its replies will have theAuthorPersistentHighlightConstants.COMMENT_PARENT_ID
property set, with the same value as the id of the parent.- Parameters:
replyComment
- The reply comment.parentHighlight
- The parent highlight.- Since:
- 18
-
addReply
void addReply(java.util.Map<java.lang.String,java.lang.String> properties, AuthorPersistentHighlight parentHighlight)
Adds a reply to the specified highlight. The parent highlight can one of the following types:AuthorPersistentHighlight.PersistentHighlightType.CHANGE_INSERT
AuthorPersistentHighlight.PersistentHighlightType.CHANGE_DELETE
AuthorPersistentHighlight.PersistentHighlightType.COMMENT
When the first reply is added to a highlight, a new property is set to this highlight:AuthorPersistentHighlightConstants.COMMENT_ID
. All its replies will have theAuthorPersistentHighlightConstants.COMMENT_PARENT_ID
property set, with the same value as the id of the parent. TheAuthorPersistentHighlightConstants.COMMENT_PARENT_ID
property in the given map is ignored. The ID of the parent highlight is used instead.- Parameters:
properties
- The reply properties. SeeAuthorPersistentHighlightConstants
for properties that are meaningful in Oxygen.parentHighlight
- The parent highlight.- Since:
- 23
-
addComment
void addComment(int startOffset, int endOffset, java.lang.String comment)
Adds a comment marker at given offsets. An error message is reported if the comment cannot be added.- Parameters:
startOffset
- The start offset of the marker (inclusive).endOffset
- The end offset of the marker (exclusive).comment
- The comment of the marker.
-
addCommentOnSelection
boolean addCommentOnSelection(int startOffset, int endOffset, java.lang.String comment)
Add comment on a selection. It returnsfalse
if the comment cannot be added.- Parameters:
startOffset
- The selection start offset.endOffset
- Interval end offset. Inclusivecomment
- The comment.- Returns:
true
if the comment is added.- Since:
- 21.1.1
-
addPersistentMarker
AuthorPersistentHighlight addPersistentMarker(AuthorPersistentHighlight.PersistentHighlightType type, int startOffset, int endOffset, java.util.Map<java.lang.String,java.lang.String> properties)
Add comment on a selection. It returnsfalse
if the comment cannot be added.- Parameters:
type
- The persistent highlight type (custom or comment)startOffset
- The selection start offset.endOffset
- Interval end offset. Inclusiveproperties
- The comment properties. SeeAuthorPersistentHighlightConstants
for properties that are meaningful in Oxygen.- Returns:
- The added comment highlight if the comment was added or
null
. - Since:
- 23
-
removeComment
void removeComment(AuthorPersistentHighlight highlight)
Removes a comment marker.- Parameters:
highlight
- The comment marker.
-
editComment
void editComment(AuthorPersistentHighlight highlight, java.lang.String newComment)
Edits the comment of a marker (comment and tracked change).- Parameters:
highlight
- The marker.newComment
- The new comment.
-
getAllHighlights
java.util.List<AuthorPersistentHighlight> getAllHighlights()
- Returns:
- An array with all highlights.
-
getAuthorNumber
java.lang.Integer getAuthorNumber(java.lang.String author)
Returns a number representing the author number.- Parameters:
author
- The name of the author.- Returns:
- A number representing the author number.
-
-