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 Comment
createComment(long commentId, long userId, String comment, Date timestamp)
Used to create Comment object from existing data, for example loaded from SQL query.Comment
findComment(long commentId)
Find comment by comment IdComment
newComment(long userId, String commentText)
Create new commentComment
newComment(SUser user, String commentText)
Creates new commentvoid
setUserModel(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:CommentManager
Find comment by comment Id- Specified by:
findComment
in interfaceCommentManager
- Parameters:
commentId
- comment identifier- Returns:
- found comment object or null
-
newComment
@NotNull public Comment newComment(long userId, String commentText)
Description copied from interface:CommentManager
Create new comment- Specified by:
newComment
in 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:CommentManager
Creates new comment- Specified by:
newComment
in 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:CommentManager
Used 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:
createComment
in 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
-
-