diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-03-15 16:10:17 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-03-16 16:53:06 +0100 |
commit | 887cda2d00ba7b62ee311bc78a4ea611696e9761 (patch) | |
tree | 92ad7a5df04ca4a7657c42dc450a28e0109e3f60 /sonar-ws | |
parent | b7fa24cc420d8ca593af5df68e4147dbe7da1bfa (diff) | |
download | sonarqube-887cda2d00ba7b62ee311bc78a4ea611696e9761.tar.gz sonarqube-887cda2d00ba7b62ee311bc78a4ea611696e9761.zip |
SONAR-7200 WS api/issues/search filter issues on leak period
Diffstat (limited to 'sonar-ws')
3 files changed, 14 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java index 4d32a2de799..90abaf64a31 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java @@ -62,6 +62,7 @@ public class IssueFilterParameters { public static final String CREATED_AT = "createdAt"; public static final String CREATED_BEFORE = "createdBefore"; public static final String CREATED_IN_LAST = "createdInLast"; + public static final String SINCE_LEAK_PERIOD = "sinceLeakPeriod"; public static final String PAGE_SIZE = "pageSize"; public static final String PAGE_INDEX = "pageIndex"; public static final String SORT = "sort"; diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java index e8c99d569e9..11837e40285 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java @@ -55,6 +55,7 @@ import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLUTIONS; import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLVED; import static org.sonarqube.ws.client.issue.IssueFilterParameters.RULES; import static org.sonarqube.ws.client.issue.IssueFilterParameters.SEVERITIES; +import static org.sonarqube.ws.client.issue.IssueFilterParameters.SINCE_LEAK_PERIOD; import static org.sonarqube.ws.client.issue.IssueFilterParameters.STATUSES; import static org.sonarqube.ws.client.issue.IssueFilterParameters.TAGS; @@ -102,6 +103,7 @@ public class IssuesService extends BaseService { .setParam(RULES, inlineMultipleParamValue(request.getRules())) .setParam("s", request.getSort()) .setParam(SEVERITIES, inlineMultipleParamValue(request.getSeverities())) + .setParam(SINCE_LEAK_PERIOD, request.getSinceLeakPeriod()) .setParam(STATUSES, inlineMultipleParamValue(request.getStatuses())) .setParam(TAGS, inlineMultipleParamValue(request.getTags())), SearchWsResponse.parser()); diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java index c6520738eb4..e782c4d95ab 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java @@ -57,6 +57,7 @@ public class SearchWsRequest { private List<String> resolutions; private Boolean resolved; private List<String> rules; + private Boolean sinceLeakPeriod; private String sort; private List<String> severities; private List<String> statuses; @@ -354,6 +355,16 @@ public class SearchWsRequest { } @CheckForNull + public Boolean getSinceLeakPeriod() { + return sinceLeakPeriod; + } + + public SearchWsRequest setSinceLeakPeriod(@Nullable Boolean sinceLeakPeriod) { + this.sinceLeakPeriod = sinceLeakPeriod; + return this; + } + + @CheckForNull public String getSort() { return sort; } |