aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-15 18:06:13 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-15 18:06:13 +0000
commita8026252cd527d5aeb5897b641ee4a8df19a452c (patch)
treebcf16b9727f3975b9ab786407da086db7fc3da71 /sonar-ws-client
parentf212d46dd02ed138de0631e40d7ba72cf4083870 (diff)
downloadsonarqube-a8026252cd527d5aeb5897b641ee4a8df19a452c.tar.gz
sonarqube-a8026252cd527d5aeb5897b641ee4a8df19a452c.zip
remove ISO categories from ws-client ResourceQuery + minor improvements of GWT API
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java30
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java7
2 files changed, 20 insertions, 17 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java
index 7c9955d3b3f..ee8fc17f77a 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java
@@ -31,17 +31,10 @@ public class ResourceQuery extends Query<Resource> {
private String[] qualifiers;
private String[] metrics;
private String[] rules;
-
- /**
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
- */
- private String[] ruleCategories;
-
private String[] ruleSeverities;
private String[] characteristicKeys;
private String model;
private boolean excludeRules = true;
- private boolean excludeRuleCategories = true;
private boolean excludeRuleSeverities = true;
private Boolean includeTrends = null;
private Boolean verbose = Boolean.FALSE;
@@ -141,7 +134,7 @@ public class ResourceQuery extends Query<Resource> {
*/
@Deprecated
public String[] getRuleCategories() {
- return ruleCategories;
+ return null;
}
/**
@@ -149,8 +142,6 @@ public class ResourceQuery extends Query<Resource> {
* @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
*/
public ResourceQuery setRuleCategories(String... ruleCategories) {
- this.ruleCategories = ruleCategories;
- this.excludeRuleCategories = false;
return this;
}
@@ -196,12 +187,17 @@ public class ResourceQuery extends Query<Resource> {
return this;
}
+ /**
+ * @deprecated since 2.5 not used anymore
+ */
public boolean isExcludeRuleCategories() {
- return excludeRuleCategories;
+ return false;
}
- public ResourceQuery setExcludeRuleCategories(boolean excludeRuleCategories) {
- this.excludeRuleCategories = excludeRuleCategories;
+ /**
+ * @deprecated since 2.5 not used anymore
+ */
+ public ResourceQuery setExcludeRuleCategories(boolean b) {
return this;
}
@@ -212,8 +208,9 @@ public class ResourceQuery extends Query<Resource> {
return excludeRuleSeverities;
}
- public void setExcludeRuleSeverities(boolean excludeRuleSeverities) {
+ public ResourceQuery setExcludeRuleSeverities(boolean excludeRuleSeverities) {
this.excludeRuleSeverities = excludeRuleSeverities;
+ return this;
}
/**
@@ -228,8 +225,8 @@ public class ResourceQuery extends Query<Resource> {
* @deprecated since 2.5 use {@link #setExcludeRuleSeverities(boolean)} instead. See http://jira.codehaus.org/browse/SONAR-1829
*/
@Deprecated
- public ResourceQuery setExcludeRulePriorities(boolean excludeRulePriorities) {
- this.excludeRuleSeverities = excludeRulePriorities;
+ public ResourceQuery setExcludeRulePriorities(boolean b) {
+ this.excludeRuleSeverities = b;
return this;
}
@@ -262,7 +259,6 @@ public class ResourceQuery extends Query<Resource> {
appendUrlParameter(url, "depth", depth);
appendUrlParameter(url, "limit", limit);
appendRuleField(url, "rules", excludeRules, rules);
- appendRuleField(url, "rule_categories", excludeRuleCategories, ruleCategories);
appendRuleField(url, "rule_priorities", excludeRuleSeverities, ruleSeverities);
appendUrlParameter(url, "includetrends", includeTrends);
appendUrlParameter(url, "model", model);
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 ff0c3f22ce9..eb89f5ec880 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
@@ -147,4 +147,11 @@ public class Violation extends Model {
this.createdAt = createdAt;
return this;
}
+
+ /**
+ * @since 2.5
+ */
+ public boolean isCreatedAfter(Date date) {
+ return createdAt!=null && date!=null && !createdAt.before(date);
+ }
}