aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client/src')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/IssueQuery.java11
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/IssueQueryTest.java5
2 files changed, 14 insertions, 2 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/IssueQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/IssueQuery.java
index a621517c384..e64c38df6f8 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/IssueQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/IssueQuery.java
@@ -34,6 +34,7 @@ public final class IssueQuery extends Query<Issue> {
private String[] status;
private String[] resolutions;
private String[] components;
+ private String[] componentRoots;
private String ruleRepository;
private String rule;
private String[] userLogins;
@@ -108,6 +109,15 @@ public final class IssueQuery extends Query<Issue> {
return this;
}
+ public String[] getComponentRoots() {
+ return componentRoots;
+ }
+
+ public IssueQuery setComponentRoots(String... componentRoots) {
+ this.componentRoots = componentRoots;
+ return this;
+ }
+
public String getRuleRepository() {
return ruleRepository;
}
@@ -190,6 +200,7 @@ public final class IssueQuery extends Query<Issue> {
appendUrlParameter(url, "status", status);
appendUrlParameter(url, "resolutions", resolutions);
appendUrlParameter(url, "components", components);
+ appendUrlParameter(url, "componentRoots", componentRoots);
appendUrlParameter(url, "ruleRepository", ruleRepository);
appendUrlParameter(url, "rule", rule);
appendUrlParameter(url, "userLogins", userLogins);
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/IssueQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/IssueQueryTest.java
index 2d7bb8a6684..f0a89b5ff17 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/IssueQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/IssueQueryTest.java
@@ -40,6 +40,7 @@ public class IssueQueryTest extends QueryTestCase {
.setKeys("key1", "key2")
.setAssigneeLogins("assigneeLogin1", "assigneeLogin2")
.setComponents("component1", "component2")
+ .setComponentRoots("componentRoot1", "componentRoot2")
.setLimit(1)
.setMinSeverity("minSev")
.setResolutions("resoltion1", "resolution2")
@@ -50,8 +51,8 @@ public class IssueQueryTest extends QueryTestCase {
.setUserLogins("userLogin1", "userLogin2")
;
assertThat(query.getUrl()).isEqualTo("/api/issues/search?keys=key1,key2&severities=sev1,sev2&minSeverity=minSev&status=status1,status2&" +
- "resolutions=resoltion1,resolution2&components=component1,component2&ruleRepository=ruleRepo&rule=rule&userLogins=userLogin1,userLogin2&" +
- "assigneeLogins=assigneeLogin1,assigneeLogin2&limit=1&");
+ "resolutions=resoltion1,resolution2&components=component1,component2&componentRoots=componentRoot1,componentRoot2&ruleRepository=ruleRepo&rule=rule&" +
+ "userLogins=userLogin1,userLogin2&assigneeLogins=assigneeLogin1,assigneeLogin2&limit=1&");
}
@Test