aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-02-03 03:55:39 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-02-03 03:55:39 +0400
commit2f2e9e04153a67fe669031c67e40351ca3cff8d1 (patch)
tree86b334db12df350f58466ec9647fbadfe15d3e13 /sonar-plugin-api
parent0c80e06c7030ee98d38b11ccfdf39c5cc3357fbc (diff)
downloadsonarqube-2f2e9e04153a67fe669031c67e40351ca3cff8d1.tar.gz
sonarqube-2f2e9e04153a67fe669031c67e40351ca3cff8d1.zip
Improve RuleMeasure
* Fluent API * RulePriority renamed into Severity
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java
index 674ddd05545..923aea5f006 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java
@@ -46,20 +46,33 @@ public class RuleMeasure extends Measure {
return rule;
}
- public void setRule(Rule rule) {
+ public RuleMeasure setRule(Rule rule) {
this.rule = rule;
+ return this;
}
public RulePriority getRulePriority() {
return rulePriority;
}
- public void setRulePriority(RulePriority rulePriority) {
+ /**
+ * @deprecated since 2.14 use {@link #setSeverity()} instead. See SONAR-1829.
+ */
+ public RuleMeasure setRulePriority(RulePriority rulePriority) {
this.rulePriority = rulePriority;
+ return this;
}
/**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+ * @since 2.14
+ */
+ public RuleMeasure setSeverity(RulePriority severity) {
+ this.rulePriority = severity;
+ return this;
+ }
+
+ /**
+ * @deprecated since 2.5. See SONAR-2007.
*/
@Deprecated
public Integer getRuleCategory() {
@@ -67,11 +80,10 @@ public class RuleMeasure extends Measure {
}
/**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+ * @deprecated since 2.5. See SONAR-2007.
*/
@Deprecated
public void setRuleCategory(Integer ruleCategory) {
-
}
@Override
@@ -131,7 +143,7 @@ public class RuleMeasure extends Measure {
}
/**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+ * @deprecated since 2.5. See SONAR-2007.
*/
@Deprecated
public static RuleMeasure createForCategory(Metric metric, Integer category, Double value) {