public interface

CommentData

implements Serializable
com.atlassian.crucible.spi.data.CommentData
Known Indirect Subclasses

Class Overview

Common attributes of comments on items and general comments on reviews.

Summary

Nested Classes
enum CommentData.Status  
Public Methods
abstract Date getCreateDate()
Get the comment's creation date.
abstract String getMessage()
abstract String getMessageAsHtml()
abstract Map<StringCustomFieldData> getMetrics()
abstract PermId<CommentData> getParentCommentId()
Get the perma-id of the comment that this comment is a reply to.
abstract String getPermaIdAsString()
Get the comment's perma-id.
abstract CommentData.Status getReadStatus()
Get the read status of the comment with respect to the user who requested the comment.
abstract List<GeneralCommentData> getReplies()
Get the direct replies to the comment.
abstract UserData getUser()
Get the comment's author.
abstract boolean isDefectApproved()
abstract boolean isDefectRaised()
abstract boolean isDeleted()
abstract boolean isDraft()
abstract void setCreateDate(Date date)
Set the comment's creation date.
abstract void setDefectApproved(boolean defectApproved)
abstract void setDefectRaised(boolean defectRaised)
abstract void setDeleted(boolean deleted)
abstract void setDraft(boolean draft)
abstract void setMessage(String message)
abstract void setMetrics(Map<StringCustomFieldData> metrics)
abstract void setParentCommentId(PermId<CommentData> parentId)
Set the parent comment of this comment.
abstract void setPermaIdAsString(String permaId)
Set the comment's perma-id.
abstract void setReadStatus(CommentData.Status status)
Set the comment's read status with respect to the user making the request.
abstract void setReplies(List<GeneralCommentData> replies)
Set the replies for the comment.
abstract void setUser(UserData user)
Set the comment's author.

Public Methods

public abstract Date getCreateDate ()

Get the comment's creation date.

public abstract String getMessage ()

public abstract String getMessageAsHtml ()

Returns
  • the wiki markup message rendered in html.

public abstract Map<StringCustomFieldData> getMetrics ()

public abstract PermId<CommentData> getParentCommentId ()

Get the perma-id of the comment that this comment is a reply to.

Returns
  • the parent comment's perma-id or a PermId with a null value for id

public abstract String getPermaIdAsString ()

Get the comment's perma-id.

public abstract CommentData.Status getReadStatus ()

Get the read status of the comment with respect to the user who requested the comment.

public abstract List<GeneralCommentData> getReplies ()

Get the direct replies to the comment. To get nested replies, get the replies of the replies returned by this method.

public abstract UserData getUser ()

Get the comment's author.

public abstract boolean isDefectApproved ()

public abstract boolean isDefectRaised ()

public abstract boolean isDeleted ()

public abstract boolean isDraft ()

public abstract void setCreateDate (Date date)

Set the comment's creation date.

This field should not be set by client code. When creating or updating a comment, it is ignored: the date when the comment was created is set as its creation date.

public abstract void setDefectApproved (boolean defectApproved)

public abstract void setDefectRaised (boolean defectRaised)

public abstract void setDeleted (boolean deleted)

public abstract void setDraft (boolean draft)

public abstract void setMessage (String message)

public abstract void setMetrics (Map<StringCustomFieldData> metrics)

public abstract void setParentCommentId (PermId<CommentData> parentId)

Set the parent comment of this comment.

This field should not be set by client code. When creating or updating a comment, it is ignored: it is set (automatically) for replies only.

Parameters
parentId the perma-id of the parent of this comment

public abstract void setPermaIdAsString (String permaId)

Set the comment's perma-id.

This field should not be set by client code. Perma-ids are allocated when a comment is created.

public abstract void setReadStatus (CommentData.Status status)

Set the comment's read status with respect to the user making the request.

This field should not be set by client code. For the author of the comment, the read status is always READ, thus it is set to this value upon creation. To update the read status for other users, see markCommentAsRead, markCommentAsLeaveUnread, and markAllCommentsAsRead.

public abstract void setReplies (List<GeneralCommentData> replies)

Set the replies for the comment.

When creating or updating a comment, it is illegal to set the replies for that comment. You should create or update each comment individually.

public abstract void setUser (UserData user)

Set the comment's author.

This field should not be set by client code. When creating or updating a comment, it is ignored: the user who requested the comment creation is set as its author.