Class CommentManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.comments.CommentManagerImpl
-
- All Implemented Interfaces:
CommentManager
public class CommentManagerImpl extends Object implements CommentManager
User: kir
-
-
Constructor Summary
Constructors Constructor Description CommentManagerImpl(SQLRunnerEx sqlRunner, CachingNumericIdSequences idSequences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommentcreateComment(long commentId, long userId, String comment, Date timestamp)Used to create Comment object from existing data, for example loaded from SQL query.CommentfindComment(long commentId)Find comment by comment IdCommentnewComment(long userId, String commentText)Create new commentCommentnewComment(SUser user, String commentText)Creates new commentvoidsetUserModel(UserModel userModel)
-
-
-
Constructor Detail
-
CommentManagerImpl
public CommentManagerImpl(@NotNull SQLRunnerEx sqlRunner, @NotNull CachingNumericIdSequences idSequences)
-
-
Method Detail
-
setUserModel
public void setUserModel(@NotNull UserModel userModel)
-
findComment
@Nullable public Comment findComment(long commentId)
Description copied from interface:CommentManagerFind comment by comment Id- Specified by:
findCommentin interfaceCommentManager- Parameters:
commentId- comment identifier- Returns:
- found comment object or null
-
newComment
@NotNull public Comment newComment(long userId, String commentText)
Description copied from interface:CommentManagerCreate new comment- Specified by:
newCommentin interfaceCommentManager- Parameters:
userId- Id of user, -1 if not availablecommentText- comment- Returns:
- created comment
-
newComment
@NotNull public Comment newComment(@Nullable SUser user, String commentText)
Description copied from interface:CommentManagerCreates new comment- Specified by:
newCommentin interfaceCommentManager- Parameters:
user- usercommentText- comment- Returns:
- new comment
-
createComment
@NotNull public Comment createComment(long commentId, long userId, String comment, Date timestamp)
Description copied from interface:CommentManagerUsed to create Comment object from existing data, for example loaded from SQL query. If brand new comment should be created, use newComment method- Specified by:
createCommentin interfaceCommentManager- Parameters:
commentId- id of the comment to be createduserId- Id of user, -1 if not availablecomment- comment texttimestamp- when comment was created- Returns:
- see above
-
-