diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-19 09:54:25 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-19 09:54:25 +0200 |
commit | 9d12b4c20860762ef329963dbab6fcea219565a2 (patch) | |
tree | bb9eaedf1a5180ba1eb2a65334535a6f89c5104b /sonar-ws-client/src | |
parent | 056145bd7cda3c24a07f182de20624219dcfc5b1 (diff) | |
download | sonarqube-9d12b4c20860762ef329963dbab6fcea219565a2.tar.gz sonarqube-9d12b4c20860762ef329963dbab6fcea219565a2.zip |
Revert "SONAR-4383 Add WS to execute issue filter"
This reverts commit 07d0c8f4bfd48c84d9dff39c1f69892e5a1dcc38.
Diffstat (limited to 'sonar-ws-client/src')
3 files changed, 1 insertions, 29 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueClient.java index 96a7fb08294..1e1fd52df4f 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueClient.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueClient.java @@ -36,13 +36,6 @@ public interface IssueClient { Issues find(IssueQuery query); /** - * Wrap the web service /api/issues/filter in order to execute issue filter. - * - * @since 3.7 - */ - Issues filter(String filterId); - - /** * Assign an existing issue to a user. A null assignee removes the assignee. * * @return the updated issue diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java index 030b3ea2323..c4b2f326555 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/internal/DefaultIssueClient.java @@ -25,7 +25,6 @@ import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.issue.*; import javax.annotation.Nullable; - import java.util.List; import java.util.Map; @@ -44,20 +43,12 @@ public class DefaultIssueClient implements IssueClient { this.parser = new IssueJsonParser(); } - @Override public Issues find(IssueQuery query) { String json = requestFactory.get(SEARCH_URL, query.urlParams()); return parser.parseIssues(json); } @Override - public Issues filter(String filterId) { - Map<String, Object> queryParams = EncodingUtils.toMap("filter", filterId); - String json = requestFactory.get("/api/issues/filter", queryParams); - return parser.parseIssues(json); - } - - @Override public Issue create(NewIssue newIssue) { String json = requestFactory.post("/api/issues/create", newIssue.urlParams()); return jsonToIssue(json); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java index 6cb81463043..d262073e26e 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java @@ -26,6 +26,7 @@ import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.base.HttpException; import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.issue.*; +import org.sonar.wsclient.issue.internal.DefaultIssueClient; import java.util.List; @@ -67,19 +68,6 @@ public class DefaultIssueClientTest { } @Test - public void should_get_issue_filter() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); - httpServer.doReturnBody("{\"issues\": [{\"key\": \"ABCDE\"}]}"); - - IssueClient client = new DefaultIssueClient(requestFactory); - Issues issues = client.filter("5"); - - assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/filter?filter=5"); - assertThat(issues.list()).hasSize(1); - assertThat(issues.list().get(0).key()).isEqualTo("ABCDE"); - } - - @Test public void should_set_severity() { HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); |