|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crucible.spi.data.CommentDataImpl
public abstract class CommentDataImpl
An abstract class containing fields common to all comment data objects
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.crucible.spi.data.CommentData |
---|
CommentData.Status |
Constructor Summary | |
---|---|
CommentDataImpl()
|
|
CommentDataImpl(java.lang.String message,
boolean draft,
boolean deleted,
boolean defectRaised,
boolean defectApproved,
CommentData.Status readStatus,
UserData user,
java.util.Date createDate,
java.lang.String permaId,
java.util.List<GeneralCommentData> replies,
java.util.Map<java.lang.String,CustomFieldData> metrics,
java.lang.String parentCommentPermId)
|
Method Summary | |
---|---|
java.util.Date |
getCreateDate()
Get the comment's creation date. |
java.lang.String |
getMessage()
|
java.util.Map<java.lang.String,CustomFieldData> |
getMetrics()
|
PermId<CommentData> |
getParentCommentId()
Get the perma-id of the comment that this comment is a reply to. |
java.lang.String |
getPermaIdAsString()
Get the comment's perma-id. |
CommentData.Status |
getReadStatus()
Get the read status of the comment with respect to the user who requested the comment. |
java.util.List<GeneralCommentData> |
getReplies()
Get the direct replies to the comment. |
UserData |
getUser()
Get the comment's author. |
boolean |
isDefectApproved()
|
boolean |
isDefectRaised()
|
boolean |
isDeleted()
|
boolean |
isDraft()
|
void |
setCreateDate(java.util.Date createDate)
Set the comment's creation date. |
void |
setDefectApproved(boolean defectApproved)
|
void |
setDefectRaised(boolean defectRaised)
|
void |
setDeleted(boolean deleted)
|
void |
setDraft(boolean draft)
|
void |
setMessage(java.lang.String message)
|
void |
setMetrics(java.util.Map<java.lang.String,CustomFieldData> metrics)
|
void |
setParentCommentId(PermId<CommentData> parentPermId)
Set the parent comment of this comment. |
void |
setPermaIdAsString(java.lang.String permaId)
Set the comment's perma-id. |
void |
setReadStatus(CommentData.Status readStatus)
Set the comment's read status with respect to the user making the request. |
void |
setReplies(java.util.List<GeneralCommentData> replies)
Set the replies for the comment. |
void |
setUser(UserData user)
Set the comment's author. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommentDataImpl()
public CommentDataImpl(java.lang.String message, boolean draft, boolean deleted, boolean defectRaised, boolean defectApproved, CommentData.Status readStatus, UserData user, java.util.Date createDate, java.lang.String permaId, java.util.List<GeneralCommentData> replies, java.util.Map<java.lang.String,CustomFieldData> metrics, java.lang.String parentCommentPermId)
Method Detail |
---|
public java.util.Map<java.lang.String,CustomFieldData> getMetrics()
getMetrics
in interface CommentData
public void setMetrics(java.util.Map<java.lang.String,CustomFieldData> metrics)
setMetrics
in interface CommentData
public java.lang.String getMessage()
getMessage
in interface CommentData
public void setMessage(java.lang.String message)
setMessage
in interface CommentData
public boolean isDraft()
isDraft
in interface CommentData
public boolean isDeleted()
isDeleted
in interface CommentData
public boolean isDefectRaised()
isDefectRaised
in interface CommentData
public boolean isDefectApproved()
isDefectApproved
in interface CommentData
public CommentData.Status getReadStatus()
CommentData
getReadStatus
in interface CommentData
public void setReadStatus(CommentData.Status readStatus)
CommentData
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
.
setReadStatus
in interface CommentData
public UserData getUser()
CommentData
getUser
in interface CommentData
public java.util.Date getCreateDate()
CommentData
getCreateDate
in interface CommentData
public void setPermaIdAsString(java.lang.String permaId)
CommentData
This field should not be set by client code. Perma-ids are allocated when a comment is created.
setPermaIdAsString
in interface CommentData
public void setDraft(boolean draft)
setDraft
in interface CommentData
public void setDeleted(boolean deleted)
setDeleted
in interface CommentData
public void setDefectRaised(boolean defectRaised)
setDefectRaised
in interface CommentData
public void setDefectApproved(boolean defectApproved)
setDefectApproved
in interface CommentData
public void setUser(UserData user)
CommentData
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.
setUser
in interface CommentData
public void setCreateDate(java.util.Date createDate)
CommentData
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.
setCreateDate
in interface CommentData
public java.lang.String getPermaIdAsString()
CommentData
getPermaIdAsString
in interface CommentData
public java.util.List<GeneralCommentData> getReplies()
CommentData
getReplies
in interface CommentData
public void setReplies(java.util.List<GeneralCommentData> replies)
CommentData
When creating or updating a comment, it is illegal to set the replies for that comment. You should create or update each comment individually.
setReplies
in interface CommentData
public PermId<CommentData> getParentCommentId()
CommentData
getParentCommentId
in interface CommentData
PermId
with a null
value for id
public void setParentCommentId(PermId<CommentData> parentPermId)
CommentData
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.
setParentCommentId
in interface CommentData
parentPermId
- the perma-id of the parent of this commentReviewService.addReply(com.atlassian.crucible.spi.PermId, GeneralCommentData)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |