com.atlassian.bamboo.comment
Class CommentManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.comment.CommentManagerImpl
All Implemented Interfaces:
CommentManager

public class CommentManagerImpl
extends java.lang.Object
implements CommentManager


Constructor Summary
CommentManagerImpl()
           
 
Method Summary
 Comment addComment(java.lang.String content, ResultsSummary resultsSummary, com.atlassian.user.User user)
           
 void deleteComment(Comment comment, ResultsSummary resultsSummary)
           
 Comment getCommentById(long commentId)
           
 java.util.List<Comment> getCommentsByUserForPlans(java.lang.String userName, java.util.List<? extends Plan> plans)
          Returns the list of comments written by a specified user for the requested plans.
 java.util.List<Comment> getPlanResultComments(ResultsSummary resultsSummary)
          Returns the list of comments attached to a plan and its subplans sorted by date (newest first).
 boolean hasPlanResultComments(ResultsSummary resultsSummary)
          Checks if any comments are attached to a plan results summary or any of its subplans' result summaries.
 void saveComment(Comment comment)
          Saves or updates a comment to the database
 void setCommentDao(CommentDao commentDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentManagerImpl

public CommentManagerImpl()
Method Detail

addComment

public Comment addComment(java.lang.String content,
                          ResultsSummary resultsSummary,
                          com.atlassian.user.User user)
Specified by:
addComment in interface CommentManager

deleteComment

public void deleteComment(@NotNull
                          Comment comment,
                          @NotNull
                          ResultsSummary resultsSummary)
Specified by:
deleteComment in interface CommentManager

getCommentById

public Comment getCommentById(long commentId)
Specified by:
getCommentById in interface CommentManager

hasPlanResultComments

public boolean hasPlanResultComments(@NotNull
                                     ResultsSummary resultsSummary)
Description copied from interface: CommentManager
Checks if any comments are attached to a plan results summary or any of its subplans' result summaries.

Specified by:
hasPlanResultComments in interface CommentManager
Returns:

getPlanResultComments

@NotNull
public java.util.List<Comment> getPlanResultComments(@NotNull
                                                             ResultsSummary resultsSummary)
Description copied from interface: CommentManager
Returns the list of comments attached to a plan and its subplans sorted by date (newest first).

Specified by:
getPlanResultComments in interface CommentManager
Returns:

saveComment

public void saveComment(Comment comment)
Description copied from interface: CommentManager
Saves or updates a comment to the database

Specified by:
saveComment in interface CommentManager
Parameters:
comment - to save

setCommentDao

public void setCommentDao(CommentDao commentDao)

getCommentsByUserForPlans

@NotNull
public java.util.List<Comment> getCommentsByUserForPlans(@NotNull
                                                                 java.lang.String userName,
                                                                 @NotNull
                                                                 java.util.List<? extends Plan> plans)
Description copied from interface: CommentManager
Returns the list of comments written by a specified user for the requested plans.

Specified by:
getCommentsByUserForPlans in interface CommentManager
plans - non-empty list of plans
Returns:
the list of comments written by the specified user for the given plans.


Copyright © 2012 Atlassian. All Rights Reserved.