aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-01-12 18:34:22 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-01-12 18:34:22 +0100
commita0aec0767a37cdafdf70b2f90fe438d53da43a26 (patch)
tree8504ebe30cb19ffc3514390e906e93456a0afac6 /sonar-ws-client/src/main/java/org
parentf42b25885bc505e7ae8645131e88dc66a5ffb0be (diff)
downloadsonarqube-a0aec0767a37cdafdf70b2f90fe438d53da43a26.tar.gz
sonarqube-a0aec0767a37cdafdf70b2f90fe438d53da43a26.zip
merge 2.5: SONAR-2024 Improvements to Java WS client
Diffstat (limited to 'sonar-ws-client/src/main/java/org')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java10
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java12
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java2
3 files changed, 12 insertions, 12 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java
index 8fb2192b299..c639d8b331a 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java
@@ -28,7 +28,7 @@ public class Rule extends Model {
private String title = null;
private String key = null;
- private String plugin = null;
+ private String repository = null;
private String description = null;
private String severity = null;
private List<RuleParam> params;
@@ -52,12 +52,12 @@ public class Rule extends Model {
return this;
}
- public String getPlugin() {
- return plugin;
+ public String getRepository() {
+ return repository;
}
- public Rule setPlugin(String plugin) {
- this.plugin = plugin;
+ public Rule setRepository(String s) {
+ this.repository = s;
return this;
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java
index d5d96f9475f..181ab9810b4 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java
@@ -26,7 +26,7 @@ public class RuleQuery extends Query<Rule> {
public static final String BASE_URL = "/api/rules";
private String language;
- private String[] plugins;
+ private String[] repositories;
private String searchText;
private String profile;
private String[] severities;
@@ -45,13 +45,13 @@ public class RuleQuery extends Query<Rule> {
return language;
}
- public RuleQuery setPlugin(String... plugins) {
- this.plugins = plugins;
+ public RuleQuery setRepositories(String... s) {
+ this.repositories = s;
return this;
}
- public String[] getPlugins() {
- return plugins;
+ public String[] getRepositories() {
+ return repositories;
}
public RuleQuery setSearchText(String searchText) {
@@ -95,7 +95,7 @@ public class RuleQuery extends Query<Rule> {
StringBuilder url = new StringBuilder(BASE_URL);
url.append('?');
appendUrlParameter(url, "language", language);
- appendUrlParameter(url, "plugins", plugins);
+ appendUrlParameter(url, "plugins", repositories);
appendUrlParameter(url, "searchtext", searchText);
appendUrlParameter(url, "profile", profile);
appendUrlParameter(url, "priorities", severities);
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java
index 001ac3463fc..041d3afd573 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java
@@ -43,7 +43,7 @@ public class RuleUnmarshaller extends AbstractUnmarshaller<Rule> {
private void parseRuleFields(JSONObject json, Rule rule) {
rule.setTitle(JsonUtils.getString(json, "title"))
.setKey(JsonUtils.getString(json, "key"))
- .setPlugin(JsonUtils.getString(json, "plugin"))
+ .setRepository(JsonUtils.getString(json, "plugin"))
.setDescription(JsonUtils.getString(json, "description"))
.setSeverity(JsonUtils.getString(json, "priority"))
.setActive("ACTIVE".equals(JsonUtils.getString(json, "status")));