From 33a4a861241086119535e6436be44180b3a6caa1 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 10 Nov 2016 09:43:54 +0100 Subject: [PATCH] SONAR-8377 Rename IssueFilterParameters to IssuesWsParameters --- .../main/java/org/sonar/server/es/Facets.java | 2 +- .../issue/InternalRubyIssueService.java | 6 +- .../sonar/server/issue/IssueQueryService.java | 80 +++++++++--------- .../sonar/server/issue/index/IssueIndex.java | 38 ++++----- .../server/issue/ws/ComponentTagsAction.java | 11 ++- .../sonar/server/issue/ws/SearchAction.java | 76 ++++++++--------- .../server/issue/ws/SearchResponseLoader.java | 4 +- .../issue/index/IssueIndexDebtTest.java | 4 +- .../ws/SearchActionComponentsMediumTest.java | 82 +++++++++---------- .../issue/ws/SearchActionMediumTest.java | 16 ++-- .../ws/client/issue/IssuesService.java | 66 +++++++-------- ...arameters.java => IssuesWsParameters.java} | 4 +- 12 files changed, 194 insertions(+), 195 deletions(-) rename sonar-ws/src/main/java/org/sonarqube/ws/client/issue/{IssueFilterParameters.java => IssuesWsParameters.java} (98%) diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java b/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java index 252446d5f8b..e77d2a5c5f8 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java @@ -36,7 +36,7 @@ import org.elasticsearch.search.aggregations.bucket.missing.Missing; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.metrics.sum.Sum; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_EFFORT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_EFFORT; public class Facets { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java index 8d915a682e7..ea4fef93951 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java @@ -37,7 +37,7 @@ import org.sonar.server.issue.workflow.Transition; import org.sonar.server.search.QueryContext; import org.sonar.server.user.UserSession; import org.sonar.server.util.RubyUtils; -import org.sonarqube.ws.client.issue.IssueFilterParameters; +import org.sonarqube.ws.client.issue.IssuesWsParameters; /** * Used through ruby code
Internal.issues
@@ -168,8 +168,8 @@ public class InternalRubyIssueService { @VisibleForTesting static SearchOptions toSearchOptions(Map props) { SearchOptions options = new SearchOptions(); - Integer pageIndex = RubyUtils.toInteger(props.get(IssueFilterParameters.PAGE_INDEX)); - Integer pageSize = RubyUtils.toInteger(props.get(IssueFilterParameters.PAGE_SIZE)); + Integer pageIndex = RubyUtils.toInteger(props.get(IssuesWsParameters.PAGE_INDEX)); + Integer pageSize = RubyUtils.toInteger(props.get(IssuesWsParameters.PAGE_SIZE)); if (pageSize != null && pageSize < 0) { options.setLimit(SearchOptions.MAX_LIMIT); } else { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java index f25a9b49d6b..7e0d2013833 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java @@ -59,7 +59,7 @@ import org.sonar.server.component.ComponentService; import org.sonar.server.rule.RuleKeyFunctions; import org.sonar.server.user.UserSession; import org.sonar.server.util.RubyUtils; -import org.sonarqube.ws.client.issue.IssueFilterParameters; +import org.sonarqube.ws.client.issue.IssuesWsParameters; import org.sonarqube.ws.client.issue.SearchWsRequest; import static com.google.common.base.Preconditions.checkArgument; @@ -74,13 +74,13 @@ import static org.sonar.api.utils.DateUtils.parseStartingDateOrDateTime; import static org.sonar.db.component.ComponentDtoFunctions.toProjectUuid; import static org.sonar.server.ws.WsUtils.checkFoundWithOptional; import static org.sonar.server.ws.WsUtils.checkRequest; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_KEYS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_ROOTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AFTER; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_IN_LAST; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.SINCE_LEAK_PERIOD; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_KEYS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_ROOTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AFTER; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_IN_LAST; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SINCE_LEAK_PERIOD; /** * This component is used to create an IssueQuery, in order to transform the component and component roots keys into uuid. @@ -109,55 +109,55 @@ public class IssueQueryService { try { IssueQuery.Builder builder = IssueQuery.builder(userSession) - .issueKeys(RubyUtils.toStrings(params.get(IssueFilterParameters.ISSUES))) - .severities(RubyUtils.toStrings(params.get(IssueFilterParameters.SEVERITIES))) - .statuses(RubyUtils.toStrings(params.get(IssueFilterParameters.STATUSES))) - .resolutions(RubyUtils.toStrings(params.get(IssueFilterParameters.RESOLUTIONS))) - .resolved(RubyUtils.toBoolean(params.get(IssueFilterParameters.RESOLVED))) - .rules(toRules(params.get(IssueFilterParameters.RULES))) - .assignees(buildAssignees(RubyUtils.toStrings(params.get(IssueFilterParameters.ASSIGNEES)))) - .languages(RubyUtils.toStrings(params.get(IssueFilterParameters.LANGUAGES))) - .tags(RubyUtils.toStrings(params.get(IssueFilterParameters.TAGS))) - .types(RubyUtils.toStrings(params.get(IssueFilterParameters.TYPES))) - .assigned(RubyUtils.toBoolean(params.get(IssueFilterParameters.ASSIGNED))) - .hideRules(RubyUtils.toBoolean(params.get(IssueFilterParameters.HIDE_RULES))) - .createdAt(RubyUtils.toDate(params.get(IssueFilterParameters.CREATED_AT))) + .issueKeys(RubyUtils.toStrings(params.get(IssuesWsParameters.ISSUES))) + .severities(RubyUtils.toStrings(params.get(IssuesWsParameters.SEVERITIES))) + .statuses(RubyUtils.toStrings(params.get(IssuesWsParameters.STATUSES))) + .resolutions(RubyUtils.toStrings(params.get(IssuesWsParameters.RESOLUTIONS))) + .resolved(RubyUtils.toBoolean(params.get(IssuesWsParameters.RESOLVED))) + .rules(toRules(params.get(IssuesWsParameters.RULES))) + .assignees(buildAssignees(RubyUtils.toStrings(params.get(IssuesWsParameters.ASSIGNEES)))) + .languages(RubyUtils.toStrings(params.get(IssuesWsParameters.LANGUAGES))) + .tags(RubyUtils.toStrings(params.get(IssuesWsParameters.TAGS))) + .types(RubyUtils.toStrings(params.get(IssuesWsParameters.TYPES))) + .assigned(RubyUtils.toBoolean(params.get(IssuesWsParameters.ASSIGNED))) + .hideRules(RubyUtils.toBoolean(params.get(IssuesWsParameters.HIDE_RULES))) + .createdAt(RubyUtils.toDate(params.get(IssuesWsParameters.CREATED_AT))) .createdAfter(buildCreatedAfterFromDates(RubyUtils.toDate(params.get(CREATED_AFTER)), (String) params.get(CREATED_IN_LAST))) - .createdBefore(RubyUtils.toDate(parseEndingDateOrDateTime((String) params.get(IssueFilterParameters.CREATED_BEFORE)))); + .createdBefore(RubyUtils.toDate(parseEndingDateOrDateTime((String) params.get(IssuesWsParameters.CREATED_BEFORE)))); Set allComponentUuids = Sets.newHashSet(); boolean effectiveOnComponentOnly = mergeDeprecatedComponentParameters(session, - RubyUtils.toBoolean(params.get(IssueFilterParameters.ON_COMPONENT_ONLY)), - RubyUtils.toStrings(params.get(IssueFilterParameters.COMPONENTS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.COMPONENT_UUIDS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.COMPONENT_KEYS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.COMPONENT_ROOT_UUIDS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.COMPONENT_ROOTS)), + RubyUtils.toBoolean(params.get(IssuesWsParameters.ON_COMPONENT_ONLY)), + RubyUtils.toStrings(params.get(IssuesWsParameters.COMPONENTS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.COMPONENT_UUIDS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.COMPONENT_KEYS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.COMPONENT_ROOT_UUIDS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.COMPONENT_ROOTS)), allComponentUuids); addComponentParameters(builder, session, effectiveOnComponentOnly, allComponentUuids, - RubyUtils.toStrings(params.get(IssueFilterParameters.PROJECT_UUIDS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.PROJECT_UUIDS)), RubyUtils.toStrings( ObjectUtils.defaultIfNull( - params.get(IssueFilterParameters.PROJECT_KEYS), - params.get(IssueFilterParameters.PROJECTS))), - RubyUtils.toStrings(params.get(IssueFilterParameters.MODULE_UUIDS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.DIRECTORIES)), - RubyUtils.toStrings(params.get(IssueFilterParameters.FILE_UUIDS)), - RubyUtils.toStrings(params.get(IssueFilterParameters.AUTHORS))); - - String sort = (String) params.get(IssueFilterParameters.SORT); + params.get(IssuesWsParameters.PROJECT_KEYS), + params.get(IssuesWsParameters.PROJECTS))), + RubyUtils.toStrings(params.get(IssuesWsParameters.MODULE_UUIDS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.DIRECTORIES)), + RubyUtils.toStrings(params.get(IssuesWsParameters.FILE_UUIDS)), + RubyUtils.toStrings(params.get(IssuesWsParameters.AUTHORS))); + + String sort = (String) params.get(IssuesWsParameters.SORT); if (!Strings.isNullOrEmpty(sort)) { builder.sort(sort); - builder.asc(RubyUtils.toBoolean(params.get(IssueFilterParameters.ASC))); + builder.asc(RubyUtils.toBoolean(params.get(IssuesWsParameters.ASC))); } - String facetMode = (String) params.get(IssueFilterParameters.FACET_MODE); + String facetMode = (String) params.get(IssuesWsParameters.FACET_MODE); if (!Strings.isNullOrEmpty(facetMode)) { builder.facetMode(facetMode); } else { - builder.facetMode(IssueFilterParameters.FACET_MODE_COUNT); + builder.facetMode(IssuesWsParameters.FACET_MODE_COUNT); } return builder.build(); diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index ce6cff8e0d3..c914d9ad63a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -87,25 +87,25 @@ import static org.elasticsearch.index.query.QueryBuilders.existsQuery; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.elasticsearch.index.query.QueryBuilders.termsQuery; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNEES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.AUTHORS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_ACTION_PLANS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_FACET_MODE_DEBT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DIRECTORIES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_ASSIGNED_TO_ME; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_EFFORT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FILE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.LANGUAGES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.MODULE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.REPORTERS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLUTIONS; -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.STATUSES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.TAGS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.TYPES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASSIGNEES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.AUTHORS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_ACTION_PLANS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_FACET_MODE_DEBT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DIRECTORIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_ASSIGNED_TO_ME; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_EFFORT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FILE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.LANGUAGES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.MODULE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.REPORTERS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RESOLUTIONS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RULES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SEVERITIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.STATUSES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TAGS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TYPES; /** * The unique entry-point to interact with Elasticsearch index "issues". diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java index 47b2f5de3f7..10412bb71d8 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java @@ -22,6 +22,7 @@ package org.sonar.server.issue.ws; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import com.google.common.io.Resources; +import java.util.Map; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -30,9 +31,7 @@ import org.sonar.api.utils.text.JsonWriter; import org.sonar.server.issue.IssueQuery; import org.sonar.server.issue.IssueQueryService; import org.sonar.server.issue.IssueService; -import org.sonarqube.ws.client.issue.IssueFilterParameters; - -import java.util.Map; +import org.sonarqube.ws.client.issue.IssuesWsParameters; /** * List issue tags matching a given query. @@ -75,10 +74,10 @@ public class ComponentTagsAction implements IssuesWsAction { @Override public void handle(Request request, Response response) throws Exception { Builder paramBuilder = ImmutableMap.builder() - .put(IssueFilterParameters.COMPONENT_UUIDS, request.mandatoryParam(PARAM_COMPONENT_UUID)) - .put(IssueFilterParameters.RESOLVED, false); + .put(IssuesWsParameters.COMPONENT_UUIDS, request.mandatoryParam(PARAM_COMPONENT_UUID)) + .put(IssuesWsParameters.RESOLVED, false); if (request.hasParam(PARAM_CREATED_AT)) { - paramBuilder.put(IssueFilterParameters.CREATED_AFTER, request.param(PARAM_CREATED_AT)); + paramBuilder.put(IssuesWsParameters.CREATED_AFTER, request.param(PARAM_CREATED_AT)); } IssueQuery query = queryService.createFromMap(paramBuilder.build()); int pageSize = request.mandatoryParamAsInt(PARAM_PAGE_SIZE); diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java index f8f4602bf37..c82408e3c59 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java @@ -56,44 +56,44 @@ import static org.sonar.api.utils.Paging.forPageIndex; import static org.sonar.server.es.SearchOptions.MAX_LIMIT; import static org.sonar.server.ws.KeyExamples.KEY_PROJECT_EXAMPLE_001; import static org.sonar.server.ws.WsUtils.writeProtobuf; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ADDITIONAL_FIELDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASC; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNED; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNEES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.AUTHORS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_KEYS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_ROOTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_ROOT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AFTER; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_BEFORE; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_IN_LAST; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_ACTION_PLANS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_FACET_MODE_DEBT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DIRECTORIES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_ASSIGNED_TO_ME; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_COUNT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_EFFORT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FILE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ISSUES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.LANGUAGES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.MODULE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ON_COMPONENT_ONLY; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PLANNED; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_KEYS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS; -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; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.TYPES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ADDITIONAL_FIELDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASC; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASSIGNED; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASSIGNEES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.AUTHORS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_KEYS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_ROOTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_ROOT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AFTER; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_BEFORE; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_IN_LAST; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_ACTION_PLANS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_FACET_MODE_DEBT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DIRECTORIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_ASSIGNED_TO_ME; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_COUNT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_EFFORT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FILE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ISSUES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.LANGUAGES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.MODULE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ON_COMPONENT_ONLY; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PLANNED; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECT_KEYS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RESOLUTIONS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RESOLVED; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RULES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SEVERITIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SINCE_LEAK_PERIOD; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.STATUSES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TAGS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TYPES; public class SearchAction implements IssuesWsAction { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java index 3a6a78349b2..1a03dbd8530 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java @@ -40,7 +40,7 @@ import org.sonar.server.es.Facets; import org.sonar.server.issue.ActionService; import org.sonar.server.issue.IssueCommentService; import org.sonar.server.issue.IssueService; -import org.sonarqube.ws.client.issue.IssueFilterParameters; +import org.sonarqube.ws.client.issue.IssuesWsParameters; import static com.google.common.collect.Lists.newArrayList; import static org.sonar.server.issue.ws.SearchAdditionalField.ACTIONS; @@ -144,7 +144,7 @@ public class SearchResponseLoader { private void completeTotalEffortFromFacet(@Nullable Facets facets, SearchResponseData result) { if (facets != null) { - Map effortFacet = facets.get(IssueFilterParameters.FACET_MODE_EFFORT); + Map effortFacet = facets.get(IssuesWsParameters.FACET_MODE_EFFORT); if (effortFacet != null) { result.setEffortTotal(effortFacet.get(Facets.TOTAL)); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java index 12c41e71352..39fe0c470dd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java @@ -52,8 +52,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.entry; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_FACET_MODE_DEBT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_EFFORT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_FACET_MODE_DEBT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_EFFORT; public class IssueIndexDebtTest { diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java index 1379e73366c..36001cd4091 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java @@ -58,7 +58,7 @@ import org.sonar.server.ws.WsTester.Result; import org.sonarqube.ws.Issues; import org.sonarqube.ws.Issues.SearchWsResponse; import org.sonarqube.ws.MediaTypes; -import org.sonarqube.ws.client.issue.IssueFilterParameters; +import org.sonarqube.ws.client.issue.IssuesWsParameters; import static com.google.common.collect.Lists.newArrayList; import static java.util.Arrays.asList; @@ -167,22 +167,22 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.PROJECT_UUIDS, project.uuid()) + .setParam(IssuesWsParameters.PROJECT_UUIDS, project.uuid()) .execute() .assertJson(this.getClass(), "search_by_project_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.PROJECT_UUIDS, "unknown") + .setParam(IssuesWsParameters.PROJECT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, project.uuid()) .execute() .assertJson(this.getClass(), "search_by_project_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") + .setParam(IssuesWsParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -209,8 +209,8 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) - .setParam(IssueFilterParameters.SINCE_LEAK_PERIOD, "true") + .setParam(IssuesWsParameters.COMPONENT_UUIDS, project.uuid()) + .setParam(IssuesWsParameters.SINCE_LEAK_PERIOD, "true") .execute() .assertJson(this.getClass(), "search_since_leak_period.json"); } @@ -237,9 +237,9 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) - .setParam(IssueFilterParameters.FILE_UUIDS, file.uuid()) - .setParam(IssueFilterParameters.SINCE_LEAK_PERIOD, "true") + .setParam(IssuesWsParameters.COMPONENT_UUIDS, project.uuid()) + .setParam(IssuesWsParameters.FILE_UUIDS, file.uuid()) + .setParam(IssuesWsParameters.SINCE_LEAK_PERIOD, "true") .execute() .assertJson(this.getClass(), "search_since_leak_period.json"); } @@ -264,7 +264,7 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.PROJECT_UUIDS, project1.uuid()) + .setParam(IssuesWsParameters.PROJECT_UUIDS, project1.uuid()) .setParam(WebService.Param.FACETS, "projectUuids") .execute() .assertJson(this.getClass(), "display_sticky_project_facet.json"); @@ -281,22 +281,22 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.FILE_UUIDS, file.uuid()) + .setParam(IssuesWsParameters.FILE_UUIDS, file.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.FILE_UUIDS, "unknown") + .setParam(IssuesWsParameters.FILE_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, file.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, file.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") + .setParam(IssuesWsParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -315,12 +315,12 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENTS, file.key()) + .setParam(IssuesWsParameters.COMPONENTS, file.key()) .execute() .assertJson(this.getClass(), "search_by_file_key.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENTS, unitTest.key()) + .setParam(IssuesWsParameters.COMPONENTS, unitTest.key()) .execute() .assertJson(this.getClass(), "search_by_test_key.json"); } @@ -340,8 +340,8 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) - .setParam(IssueFilterParameters.FILE_UUIDS, file1.uuid() + "," + file3.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, project.uuid()) + .setParam(IssuesWsParameters.FILE_UUIDS, file1.uuid() + "," + file3.uuid()) .setParam(WebService.Param.FACETS, "fileUuids") .execute() .assertJson(this.getClass(), "display_file_facet.json"); @@ -359,22 +359,22 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, directory.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") + .setParam(IssuesWsParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java") + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java") .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -397,34 +397,34 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory1.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, directory1.uuid()) .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory2.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, directory2.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.MODULE_UUIDS, module1.uuid()) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") + .setParam(IssuesWsParameters.MODULE_UUIDS, module1.uuid()) + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.MODULE_UUIDS, module2.uuid()) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") + .setParam(IssuesWsParameters.MODULE_UUIDS, module2.uuid()) + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "no_issue.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java") + .setParam(IssuesWsParameters.DIRECTORIES, "src/main/java") .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -447,8 +447,8 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, module.uuid()) - .setParam(IssueFilterParameters.MODULE_UUIDS, subModule1.uuid() + "," + subModule3.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, module.uuid()) + .setParam(IssuesWsParameters.MODULE_UUIDS, subModule1.uuid() + "," + subModule3.uuid()) .setParam(WebService.Param.FACETS, "moduleUuids") .execute() .assertJson(this.getClass(), "display_module_facet.json"); @@ -487,7 +487,7 @@ public class SearchActionComponentsMediumTest { userSessionRule.login("john").addProjectUuidPermissions(UserRole.USER, view.uuid()); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, view.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, view.uuid()) .execute() .assertJson(this.getClass(), "search_by_view_uuid.json"); } @@ -507,7 +507,7 @@ public class SearchActionComponentsMediumTest { userSessionRule.login("john").addProjectUuidPermissions(UserRole.CODEVIEWER, view.uuid()); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, view.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, view.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -528,7 +528,7 @@ public class SearchActionComponentsMediumTest { userSessionRule.login("john").addComponentUuidPermission(UserRole.USER, view.uuid(), subView.uuid()); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, subView.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, subView.uuid()) .execute() .assertJson(this.getClass(), "search_by_view_uuid.json"); } @@ -550,7 +550,7 @@ public class SearchActionComponentsMediumTest { userSessionRule.login("john").addComponentUuidPermission(UserRole.CODEVIEWER, view.uuid(), subView.uuid()); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, subView.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, subView.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); } @@ -569,13 +569,13 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.AUTHORS, "leia") + .setParam(IssuesWsParameters.AUTHORS, "leia") .setParam(WebService.Param.FACETS, "authors") .execute() .assertJson(this.getClass(), "search_by_authors.json"); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.AUTHORS, "unknown") + .setParam(IssuesWsParameters.AUTHORS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -598,7 +598,7 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, developer.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, developer.uuid()) .execute() .assertJson(this.getClass(), "search_by_developer.json"); } @@ -630,7 +630,7 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam(IssueFilterParameters.COMPONENT_UUIDS, technicalProject.uuid()) + .setParam(IssuesWsParameters.COMPONENT_UUIDS, technicalProject.uuid()) .execute(); result .assertJson(this.getClass(), "search_by_developer.json"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java index 6f64b9e9d2a..a852f54abbb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java @@ -60,14 +60,14 @@ import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.server.issue.ws.IssuesWs.API_ENDPOINT; import static org.sonar.server.issue.ws.SearchAction.SEARCH_ACTION; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ADDITIONAL_FIELDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AFTER; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_FACET_MODE_DEBT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE_EFFORT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.HIDE_COMMENTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PAGE_INDEX; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PAGE_SIZE; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ADDITIONAL_FIELDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AFTER; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_FACET_MODE_DEBT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE_EFFORT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.HIDE_COMMENTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PAGE_INDEX; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PAGE_SIZE; public class SearchActionMediumTest { 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 080653b08b5..976c112a69b 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 @@ -24,39 +24,39 @@ import org.sonarqube.ws.client.BaseService; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.WsConnector; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ADDITIONAL_FIELDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASC; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNED; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ASSIGNEES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.AUTHORS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_KEYS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_ROOTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_ROOT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.COMPONENT_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AFTER; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_AT; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_BEFORE; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.CREATED_IN_LAST; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DEPRECATED_ACTION_PLANS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.DIRECTORIES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FACET_MODE; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.FILE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ISSUES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.LANGUAGES; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.MODULE_UUIDS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.ON_COMPONENT_ONLY; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECTS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_KEYS; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS; -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; -import static org.sonarqube.ws.client.issue.IssueFilterParameters.TYPES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ADDITIONAL_FIELDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASC; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASSIGNED; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ASSIGNEES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.AUTHORS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_KEYS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_ROOTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_ROOT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.COMPONENT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AFTER; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_AT; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_BEFORE; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.CREATED_IN_LAST; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DEPRECATED_ACTION_PLANS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.DIRECTORIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FACET_MODE; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.FILE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ISSUES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.LANGUAGES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.MODULE_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.ON_COMPONENT_ONLY; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECTS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECT_KEYS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.PROJECT_UUIDS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RESOLUTIONS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RESOLVED; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.RULES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SEVERITIES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.SINCE_LEAK_PERIOD; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.STATUSES; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TAGS; +import static org.sonarqube.ws.client.issue.IssuesWsParameters.TYPES; public class IssuesService extends BaseService { 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/IssuesWsParameters.java similarity index 98% rename from sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java rename to sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java index dd9da530544..c2e72e4196e 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/IssuesWsParameters.java @@ -27,7 +27,7 @@ import java.util.List; /** * @since 5.3 */ -public class IssueFilterParameters { +public class IssuesWsParameters { public static final String ISSUES = "issues"; public static final String SEVERITIES = "severities"; @@ -110,7 +110,7 @@ public class IssueFilterParameters { } })); - private IssueFilterParameters() { + private IssuesWsParameters() { // Utility class } } -- 2.39.5