From 43888ce6c210e5502bf8bb52e5762906aa50c70c Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Tue, 26 Apr 2011 15:24:57 +0200 Subject: SONAR-2382 Complete review web service --- .../java/org/sonar/wsclient/services/Violation.java | 19 ++++++++++++++----- .../wsclient/unmarshallers/ViolationUnmarshaller.java | 3 ++- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'sonar-ws-client/src/main/java/org/sonar/wsclient') 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.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) { -- cgit v1.2.3