com.atlassian.crucible.spi.data
Class VersionedLineCommentData

java.lang.Object
  extended by com.atlassian.crucible.spi.data.CommentDataImpl
      extended by com.atlassian.crucible.spi.data.VersionedCommentData
          extended by com.atlassian.crucible.spi.data.VersionedLineCommentData
All Implemented Interfaces:
CommentData, java.io.Serializable

public class VersionedLineCommentData
extends VersionedCommentData
implements java.io.Serializable

Contains the attributes of a comment on an item in a review.

If the line ranges are null, then the comment refers to the entire file

See Also:
Serialized Form

Nested Class Summary
static class VersionedLineCommentData.LineRangeDetail
           
static class VersionedLineCommentData.VersionedLineCommentBuilder
          Creates VersionedLineCommentData instances.
 
Nested classes/interfaces inherited from class com.atlassian.crucible.spi.data.CommentDataImpl
CommentDataImpl.CommentDataBuilder<M extends CommentDataImpl.CommentDataBuilder,T extends CommentDataImpl>
 
Nested classes/interfaces inherited from interface com.atlassian.crucible.spi.data.CommentData
CommentData.Status
 
Field Summary
 
Fields inherited from class com.atlassian.crucible.spi.data.VersionedCommentData
reviewItemId
 
Constructor Summary
VersionedLineCommentData()
          Deprecated. only used for serialization.
VersionedLineCommentData(PermId<ReviewItemData> reviewItemId, java.lang.String message, boolean draft, boolean deleted, boolean defectRaised, boolean defectApproved, CommentData.Status readStatus, UserData user, java.util.Date createDate, java.lang.String fromLineRange, java.lang.String toLineRange, java.util.List<GeneralCommentData> replies, java.util.Map<java.lang.String,CustomFieldData> metrics, java.lang.String parentPermId)
          Deprecated. please use builder() instead.
VersionedLineCommentData(PermId<ReviewItemData> reviewItemId, java.lang.String message, boolean draft, boolean deleted, boolean defectRaised, boolean defectApproved, CommentData.Status readStatus, UserData user, java.util.Date createDate, java.lang.String fromLineRange, java.lang.String toLineRange, java.lang.String permId, java.util.List<GeneralCommentData> replies, java.util.Map<java.lang.String,CustomFieldData> metrics, java.lang.String parentPermId)
          Deprecated. please use builder() instead.
VersionedLineCommentData(PermId<ReviewItemData> reviewItemId, java.lang.String message, java.lang.String messageAsHtml, boolean draft, boolean deleted, boolean defectRaised, boolean defectApproved, CommentData.Status readStatus, UserData user, java.util.Date createDate, java.lang.String fromLineRange, java.lang.String toLineRange, java.util.List<GeneralCommentData> replies, java.util.Map<java.lang.String,CustomFieldData> metrics, java.lang.String parentPermId)
          Deprecated. please use builder() instead.
VersionedLineCommentData(PermId<ReviewItemData> reviewItemId, java.lang.String message, java.lang.String messageAsHtml, boolean draft, boolean deleted, boolean defectRaised, boolean defectApproved, CommentData.Status readStatus, UserData user, java.util.Date createDate, java.lang.String fromLineRange, java.lang.String toLineRange, java.lang.String permId, java.util.List<GeneralCommentData> replies, java.util.Map<java.lang.String,CustomFieldData> metrics, java.lang.String parentPermId)
          Deprecated. please use builder() instead.
 
Method Summary
static VersionedLineCommentData.VersionedLineCommentBuilder builder()
           
 java.lang.String getFromLineRange()
          Deprecated. returns the line range on the oldest revision only (pre-iterative reviewing). Use getLineRanges() instead.
 java.util.List<VersionedLineCommentData.LineRangeDetail> getLineRanges()
           
 java.lang.String getToLineRange()
          Deprecated. returns the line range on the newest revision only (pre-iterative reviewing). Use getLineRanges() instead.
 void setFromLineRange(java.lang.String fromLineRange)
          Deprecated. use setLineRanges(java.util.List) instead.
 void setLineRanges(java.util.List<VersionedLineCommentData.LineRangeDetail> details)
           
 void setToLineRange(java.lang.String toLineRange)
          Deprecated. use setLineRanges(java.util.List) instead.
 
Methods inherited from class com.atlassian.crucible.spi.data.VersionedCommentData
getPermaId, getReviewItemId, setPermaId, setReviewItemId
 
Methods inherited from class com.atlassian.crucible.spi.data.CommentDataImpl
getCreateDate, getMessage, getMessageAsHtml, getMetrics, getParentCommentId, getPermaIdAsString, getReadStatus, getReplies, getUser, isDefectApproved, isDefectRaised, isDeleted, isDraft, setCreateDate, setDefectApproved, setDefectRaised, setDeleted, setDraft, setMessage, setMessageAsHtml, setMetrics, setParentCommentId, setPermaIdAsString, setReadStatus, setReplies, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedLineCommentData

@Deprecated
public VersionedLineCommentData()
Deprecated. only used for serialization.


VersionedLineCommentData

@Deprecated
public VersionedLineCommentData(PermId<ReviewItemData> reviewItemId,
                                           java.lang.String message,
                                           boolean draft,
                                           boolean deleted,
                                           boolean defectRaised,
                                           boolean defectApproved,
                                           CommentData.Status readStatus,
                                           UserData user,
                                           java.util.Date createDate,
                                           java.lang.String fromLineRange,
                                           java.lang.String toLineRange,
                                           java.util.List<GeneralCommentData> replies,
                                           java.util.Map<java.lang.String,CustomFieldData> metrics,
                                           java.lang.String parentPermId)
Deprecated. please use builder() instead.


VersionedLineCommentData

@Deprecated
public VersionedLineCommentData(PermId<ReviewItemData> reviewItemId,
                                           java.lang.String message,
                                           java.lang.String messageAsHtml,
                                           boolean draft,
                                           boolean deleted,
                                           boolean defectRaised,
                                           boolean defectApproved,
                                           CommentData.Status readStatus,
                                           UserData user,
                                           java.util.Date createDate,
                                           java.lang.String fromLineRange,
                                           java.lang.String toLineRange,
                                           java.util.List<GeneralCommentData> replies,
                                           java.util.Map<java.lang.String,CustomFieldData> metrics,
                                           java.lang.String parentPermId)
Deprecated. please use builder() instead.

Parameters:
message - the contents of the comment.
messageAsHtml - the wiki rendered version of the comment. Can be null. see ReviewService.addComment(com.atlassian.crucible.spi.PermId, VersionedLineCommentData)

VersionedLineCommentData

@Deprecated
public VersionedLineCommentData(PermId<ReviewItemData> reviewItemId,
                                           java.lang.String message,
                                           boolean draft,
                                           boolean deleted,
                                           boolean defectRaised,
                                           boolean defectApproved,
                                           CommentData.Status readStatus,
                                           UserData user,
                                           java.util.Date createDate,
                                           java.lang.String fromLineRange,
                                           java.lang.String toLineRange,
                                           java.lang.String permId,
                                           java.util.List<GeneralCommentData> replies,
                                           java.util.Map<java.lang.String,CustomFieldData> metrics,
                                           java.lang.String parentPermId)
Deprecated. please use builder() instead.


VersionedLineCommentData

@Deprecated
public VersionedLineCommentData(PermId<ReviewItemData> reviewItemId,
                                           java.lang.String message,
                                           java.lang.String messageAsHtml,
                                           boolean draft,
                                           boolean deleted,
                                           boolean defectRaised,
                                           boolean defectApproved,
                                           CommentData.Status readStatus,
                                           UserData user,
                                           java.util.Date createDate,
                                           java.lang.String fromLineRange,
                                           java.lang.String toLineRange,
                                           java.lang.String permId,
                                           java.util.List<GeneralCommentData> replies,
                                           java.util.Map<java.lang.String,CustomFieldData> metrics,
                                           java.lang.String parentPermId)
Deprecated. please use builder() instead.

Method Detail

getFromLineRange

public java.lang.String getFromLineRange()
Deprecated. returns the line range on the oldest revision only (pre-iterative reviewing). Use getLineRanges() instead.

Returns the line range on the oldest revision in of the review item. Note that this field predates support for iterative reviews. This method will NOT return a value if the comment was made on revisions other than the oldest.

Returns:
the line range on the oldest revision.

getToLineRange

public java.lang.String getToLineRange()
Deprecated. returns the line range on the newest revision only (pre-iterative reviewing). Use getLineRanges() instead.

Returns the line range on the newest revision in of the review item. Note that this field predates support for iterative reviews. This method will NOT return a value if the comment was made on revisions other than the newest.

Returns:
the line range on the newest revision in of the review item.

setFromLineRange

public void setFromLineRange(java.lang.String fromLineRange)
Deprecated. use setLineRanges(java.util.List) instead.

Parameters:
fromLineRange -

setToLineRange

public void setToLineRange(java.lang.String toLineRange)
Deprecated. use setLineRanges(java.util.List) instead.

Parameters:
toLineRange -

getLineRanges

public java.util.List<VersionedLineCommentData.LineRangeDetail> getLineRanges()
Returns:
the line ranges on all file revisions.

setLineRanges

public void setLineRanges(java.util.List<VersionedLineCommentData.LineRangeDetail> details)
Parameters:
details - the line ranges on all file revisions.

builder

public static VersionedLineCommentData.VersionedLineCommentBuilder builder()
Returns:
a VersionedLineCommentData.VersionedLineCommentBuilder which can be used to create an instance of VersionedLineCommentData.