Class Comment
- java.lang.Object
-
- jetbrains.buildServer.serverSide.comments.Comment
-
- Direct Known Subclasses:
NullComment
public abstract class Comment extends Object
This class represents various comments in TeamCity. Comment attributes are user, comment, and timestamp. Any of the fields (excluding timestamp) can be null.- See Also:
CommentManager
-
-
Field Summary
Fields Modifier and Type Field Description protected DatemyTimestamp
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddelete()Delete this comment from the databaseStringgetComment()longgetCommentId()DategetTimestamp()SUsergetUser()longgetUserId()abstract booleansave()voidsetCurrentInfo(SUser user, String comment)Set comment current information.voidsetTimestamp(Date timestamp)StringtoString()
-
-
-
Field Detail
-
myTimestamp
protected Date myTimestamp
-
-
Method Detail
-
getComment
@Nullable public String getComment()
- Returns:
- comment text
-
getTimestamp
@NotNull public Date getTimestamp()
- Returns:
- when comment was updated last time
-
getCommentId
public long getCommentId()
- Returns:
- database comment identifier
-
getUser
@Nullable public SUser getUser()
- Returns:
- user who made the comment
-
getUserId
public long getUserId()
- Returns:
- id of user who made the comment, -1 if not available
-
setCurrentInfo
public void setCurrentInfo(@Nullable SUser user, String comment)Set comment current information. Must call save() to persist this information in the database.- Parameters:
user- comment authorcomment- comment text
-
setTimestamp
public void setTimestamp(@NotNull Date timestamp)
-
save
public abstract boolean save()
- Returns:
- true if the save operation was successful
-
delete
public abstract void delete()
Delete this comment from the database
-
-