aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org/sonar/wsclient
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-04-26 15:24:57 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-04-26 15:25:08 +0200
commit43888ce6c210e5502bf8bb52e5762906aa50c70c (patch)
tree1af2171a2680c42efab450a491e65480a45fde2e /sonar-ws-client/src/main/java/org/sonar/wsclient
parentd488859bea5acf8406ff19465c1187950105ac05 (diff)
downloadsonarqube-43888ce6c210e5502bf8bb52e5762906aa50c70c.tar.gz
sonarqube-43888ce6c210e5502bf8bb52e5762906aa50c70c.zip
SONAR-2382 Complete review web service
Diffstat (limited to 'sonar-ws-client/src/main/java/org/sonar/wsclient')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java19
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java3
2 files changed, 16 insertions, 6 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
index e29c37396ba..0d5b816425f 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
@@ -33,7 +33,8 @@ public class Violation extends Model {
private String resourceScope = null;
private String resourceQualifier = null;
private Date createdAt = null;
- private boolean switchedOff;
+ private boolean falsePositive;
+ private Long reviewId = null;
public String getMessage() {
return message;
@@ -159,16 +160,24 @@ public class Violation extends Model {
/**
* @since 2.8
*/
- public Violation setSwitchedOff(boolean switchedOff) {
- this.switchedOff = switchedOff;
+ public Violation setFalsePositive(Boolean b) {
+ this.falsePositive = (b != null && b);
return this;
}
/**
* @since 2.8
*/
- public boolean isSwitchedOff() {
- return switchedOff;
+ public boolean isFalsePositive() {
+ return falsePositive;
}
+ public Long getReviewId() {
+ return reviewId;
+ }
+
+ public Violation setReviewId(Long l) {
+ this.reviewId = l;
+ return this;
+ }
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
index df62e5c0e16..45f692b582c 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
@@ -33,7 +33,8 @@ public class ViolationUnmarshaller extends AbstractUnmarshaller<Violation> {
violation.setLine(utils.getInteger(json, "line"));
violation.setSeverity(utils.getString(json, "priority"));
violation.setCreatedAt(utils.getDateTime(json, "createdAt"));
- violation.setSwitchedOff(utils.getBoolean(json, "switchedOff"));
+ violation.setFalsePositive(utils.getBoolean(json, "falsePositive"));
+ violation.setReviewId(utils.getLong(json, "review"));
Object rule = utils.getField(json, "rule");
if (rule != null) {