com.atlassian.jira.rest.v2.issue
Class CommentResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.CommentResource

public class CommentResource
extends Object

Since:
4.2

Constructor Summary
CommentResource(CommentService commentService, JiraAuthenticationContext authContext, ContextI18n i18n, ProjectRoleManager projectRoleManager, JiraBaseUrls jiraBaseUrls, IssueFinder issueFinder)
           
 
Method Summary
 javax.ws.rs.core.Response addComment(String issueIdOrKey, CommentJsonBean request)
          Adds a new comment to an issue.
 javax.ws.rs.core.Response deleteComment(String issueIdOrKey, String commentId)
          Deletes an existing comment .
 javax.ws.rs.core.Response getComment(String issueIdOrKey, String commentId)
          Returns a single issue comment.
 javax.ws.rs.core.Response getComments(String issueIdOrKey)
          Returns all comments for an issue.
 javax.ws.rs.core.Response updateComment(String issueIdOrKey, String commentId, CommentJsonBean request)
          Updates an existing comment using its JSON representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentResource

public CommentResource(CommentService commentService,
                       JiraAuthenticationContext authContext,
                       ContextI18n i18n,
                       ProjectRoleManager projectRoleManager,
                       JiraBaseUrls jiraBaseUrls,
                       IssueFinder issueFinder)
Method Detail

getComments

public javax.ws.rs.core.Response getComments(String issueIdOrKey)
Returns all comments for an issue.

Parameters:
issueIdOrKey - to get comments for
Returns:
all comments for the issue

getComment

public javax.ws.rs.core.Response getComment(String issueIdOrKey,
                                            String commentId)
Returns a single issue comment.

Parameters:
commentId - the ID of the comment to request
issueIdOrKey - of the issue the comment belongs to
Returns:
a Response containing a CommentJsonBean

updateComment

public javax.ws.rs.core.Response updateComment(String issueIdOrKey,
                                               String commentId,
                                               CommentJsonBean request)
Updates an existing comment using its JSON representation.

Parameters:
issueIdOrKey - a string containing the issue id or key the comment belongs to
commentId - id of the comment to be updated
request - json body of request converted to a CommentJsonBean
Returns:
updated Comment

deleteComment

public javax.ws.rs.core.Response deleteComment(String issueIdOrKey,
                                               String commentId)
Deletes an existing comment .

Parameters:
issueIdOrKey - a string containing the issue id or key the comment belongs to
commentId - id of the comment to be deleted
Returns:
No Content Response

addComment

public javax.ws.rs.core.Response addComment(String issueIdOrKey,
                                            CommentJsonBean request)
Adds a new comment to an issue.

Parameters:
issueIdOrKey - a string containing the issue id or key the comment will be added to
request - json body of request converted to a CommentJsonBean
Returns:
the added comment


Copyright © 2002-2012 Atlassian. All Rights Reserved.