org.sonar.wsclient.services
Class ReviewUpdateQuery

java.lang.Object
  extended by org.sonar.wsclient.services.AbstractQuery<MODEL>
      extended by org.sonar.wsclient.services.UpdateQuery<Review>
          extended by org.sonar.wsclient.services.ReviewUpdateQuery

public class ReviewUpdateQuery
extends UpdateQuery<Review>

Since:
2.9

Method Summary
static ReviewUpdateQuery addComment(long id, String comment)
          Creates query to add comment to review.
 String getAssignee()
           
 String getBody()
          Property comment transmitted through request body as content may exceed URL size allowed by the server.
 String getComment()
           
 Class<Review> getModelClass()
           
 String getResolution()
           
 long getReviewId()
           
 String getUrl()
          Must start with a slash, for example: /api/metrics
static ReviewUpdateQuery reassign(long id, String assignee)
          Creates query to reassign review.
static ReviewUpdateQuery reopen(long id)
          Creates query to reopen review.
static ReviewUpdateQuery resolve(long id, String resolution)
          Creates query to resolve review.
 ReviewUpdateQuery setAssignee(String userLogin)
           
 ReviewUpdateQuery setComment(String comment)
           
 ReviewUpdateQuery setResolution(String resolution)
           
 
Methods inherited from class org.sonar.wsclient.services.AbstractQuery
appendUrlParameter, appendUrlParameter, appendUrlParameter, encode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addComment

public static ReviewUpdateQuery addComment(long id,
                                           String comment)
Creates query to add comment to review.


reassign

public static ReviewUpdateQuery reassign(long id,
                                         String assignee)
Creates query to reassign review.


resolve

public static ReviewUpdateQuery resolve(long id,
                                        String resolution)
Creates query to resolve review. If resolution "FALSE-POSITIVE", then you must provide comment using setComment(String). Otherwise comment is optional.

Parameters:
resolution - can be "FIXED" or "FALSE-POSITIVE"

reopen

public static ReviewUpdateQuery reopen(long id)
Creates query to reopen review. If review was resolved as "FALSE-POSITIVE", then you must provide comment using setComment(String). Otherwise comment is optional.


getReviewId

public long getReviewId()

setComment

public ReviewUpdateQuery setComment(String comment)

getComment

public String getComment()

getAssignee

public String getAssignee()

setAssignee

public ReviewUpdateQuery setAssignee(String userLogin)

getResolution

public String getResolution()

setResolution

public ReviewUpdateQuery setResolution(String resolution)
Parameters:
resolution - can be "FIXED" or "FALSE-POSITIVE"

getUrl

public String getUrl()
Description copied from class: AbstractQuery
Must start with a slash, for example: /api/metrics

IMPORTANT: In implementations of this method we must use helper methods to construct URL.

Specified by:
getUrl in class AbstractQuery<Review>
See Also:
AbstractQuery.encode(String), AbstractQuery.appendUrlParameter(StringBuilder, String, Object), AbstractQuery.appendUrlParameter(StringBuilder, String, Object[]), AbstractQuery.appendUrlParameter(StringBuilder, String, Date, boolean)

getBody

public String getBody()
Property comment transmitted through request body as content may exceed URL size allowed by the server.

Overrides:
getBody in class AbstractQuery<Review>

getModelClass

public Class<Review> getModelClass()
Specified by:
getModelClass in class UpdateQuery<Review>


Copyright © 2009-2011 SonarSource. All Rights Reserved.