com.atlassian.bamboo.comment
Interface CommentManager

All Known Implementing Classes:
CommentManagerImpl

public interface CommentManager


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
 

Method Detail

addComment

Comment addComment(java.lang.String content,
                   ResultsSummary resultsSummary,
                   com.atlassian.user.User user)

deleteComment

void deleteComment(Comment comment,
                   ResultsSummary resultsSummary)

getCommentById

Comment getCommentById(long commentId)

saveComment

void saveComment(Comment comment)
Saves or updates a comment to the database

Parameters:
comment - to save

hasPlanResultComments

boolean hasPlanResultComments(@NotNull
                              ResultsSummary resultsSummary)
Checks if any comments are attached to a plan results summary or any of its subplans' result summaries.

Parameters:
resultsSummary -
Returns:

getPlanResultComments

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

Parameters:
resultsSummary -
Returns:

getCommentsByUserForPlans

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

Parameters:
userName -
plans - non-empty list of plans
Returns:
the list of comments written by the specified user for the given plans.
Throws:
java.lang.IllegalArgumentException - if plans is empty


Copyright © 2011 Atlassian. All Rights Reserved.