aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 16:10:46 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 16:10:46 +0200
commit28ad4901ffc85a84d1b0a7458ae48e54a7b0a2b4 (patch)
tree3f754503bbda0b810e59bd823a6678e1028c46e6 /sonar-core
parenta00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (diff)
downloadsonarqube-28ad4901ffc85a84d1b0a7458ae48e54a7b0a2b4.tar.gz
sonarqube-28ad4901ffc85a84d1b0a7458ae48e54a7b0a2b4.zip
SONAR-2706 add Review#getRuleName()
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/workflow/review/DefaultReview.java11
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/workflow/review/ImmutableReview.java10
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/workflow/review/Review.java2
3 files changed, 18 insertions, 5 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/DefaultReview.java b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/DefaultReview.java
index 51a52790000..2c6519e38bc 100644
--- a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/DefaultReview.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/DefaultReview.java
@@ -39,6 +39,7 @@ public final class DefaultReview implements MutableReview {
private Long reviewId;
private String ruleRepositoryKey;
private String ruleKey;
+ private String ruleName;
private Long line;
private boolean switchedOff = false;
private boolean manual = false;
@@ -85,6 +86,15 @@ public final class DefaultReview implements MutableReview {
return this;
}
+ public String getRuleName() {
+ return ruleName;
+ }
+
+ public DefaultReview setRuleName(String s) {
+ this.ruleName = s;
+ return this;
+ }
+
public Long getLine() {
return line;
}
@@ -210,6 +220,7 @@ public final class DefaultReview implements MutableReview {
clone.setReviewId(reviewId);
clone.setRuleKey(ruleKey);
clone.setRuleRepositoryKey(ruleRepositoryKey);
+ clone.setRuleName(ruleName);
clone.setSeverity(severity);
clone.setStatus(status);
clone.setSwitchedOff(switchedOff);
diff --git a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/ImmutableReview.java b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/ImmutableReview.java
index 1f3b7e9e022..35c8f01a470 100644
--- a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/ImmutableReview.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/ImmutableReview.java
@@ -24,9 +24,9 @@ import java.util.Map;
public class ImmutableReview implements Review {
private Long violationId;
private Long reviewId;
- private Long ruleId;
private String ruleRepositoryKey;
private String ruleKey;
+ private String ruleName;
private Long line;
private boolean switchedOff = false;
private boolean manual = false;
@@ -52,12 +52,12 @@ public class ImmutableReview implements Review {
this.reviewId = reviewId;
}
- public Long getRuleId() {
- return ruleId;
+ public String getRuleName() {
+ return ruleName;
}
- void setRuleId(Long ruleId) {
- this.ruleId = ruleId;
+ void setRuleName(String s) {
+ this.ruleName = s;
}
public String getRuleRepositoryKey() {
diff --git a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/Review.java b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/Review.java
index 95c8e28080a..777b6c5da96 100644
--- a/sonar-core/src/main/java/org/sonar/core/review/workflow/review/Review.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/workflow/review/Review.java
@@ -27,6 +27,8 @@ public interface Review {
String getRuleKey();
+ String getRuleName();
+
boolean isSwitchedOff();
String getMessage();