]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8377 Rename IssueFilterParameters to IssuesWsParameters 1377/head
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 10 Nov 2016 08:43:54 +0000 (09:43 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 10 Nov 2016 08:57:51 +0000 (09:57 +0100)
13 files changed:
server/sonar-server/src/main/java/org/sonar/server/es/Facets.java
server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/ComponentTagsAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java [new file with mode: 0644]

index 252446d5f8b932f10bad2c6726bc43e83bee9180..e77d2a5c5f8698564b9ef9acc87bf799cdd8f21f 100644 (file)
@@ -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 {
 
index 8d915a682e75deeb0a015f4cf0a5322ffd2cb768..ea4fef93951886a4ad3ff84c5f23d7f778e9242f 100644 (file)
@@ -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 <pre>Internal.issues</pre>
@@ -168,8 +168,8 @@ public class InternalRubyIssueService {
   @VisibleForTesting
   static SearchOptions toSearchOptions(Map<String, Object> 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 {
index f25a9b49d6b63a994ab8a50e7ad001c8ecf684bc..7e0d2013833412450f6394d594a72cabd6438fe6 100644 (file)
@@ -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<String> 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();
 
index ce6cff8e0d39c9ff0526a0905e193db06471898f..c914d9ad63aee797807536dea4d4224e0cf3e0b9 100644 (file)
@@ -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".
index 47b2f5de3f7dbb37a55519e03105942a4204ae52..10412bb71d885a875a561b209890d2d9e53a64e5 100644 (file)
@@ -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<String, Object> paramBuilder = ImmutableMap.<String, Object>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);
index f8f4602bf3769b84e59c7cde705aebbf9ea353ee..c82408e3c59e02bf62c153512f92306db56417ca 100644 (file)
@@ -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 {
 
index 3a6a78349b274501487ff4f217f3c37739afc69e..1a03dbd85307ce65336d3961462f8162b79a141f 100644 (file)
@@ -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<String, Long> effortFacet = facets.get(IssueFilterParameters.FACET_MODE_EFFORT);
+      Map<String, Long> effortFacet = facets.get(IssuesWsParameters.FACET_MODE_EFFORT);
       if (effortFacet != null) {
         result.setEffortTotal(effortFacet.get(Facets.TOTAL));
       }
index 12c41e7135286a476c62fa09343746a2ec90e159..39fe0c470dda5e3d1e67165f06fbab80ad895f1b 100644 (file)
@@ -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 {
 
index 1379e73366c66833d62a9df4b54d4d678cb908c2..36001cd409178290a6b98e6841f7fc366314fc8d 100644 (file)
@@ -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");
index 6f64b9e9d2a8d1e3dca3955a81b7fadf1f3bdf7d..a852f54abbbd42ea88b536072b84ad6d14099fc4 100644 (file)
@@ -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/IssueFilterParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java
deleted file mode 100644 (file)
index dd9da53..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonarqube.ws.client.issue;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import java.util.List;
-
-/**
- * @since 5.3
- */
-public class IssueFilterParameters {
-
-  public static final String ISSUES = "issues";
-  public static final String SEVERITIES = "severities";
-  public static final String STATUSES = "statuses";
-  public static final String RESOLUTIONS = "resolutions";
-  public static final String RESOLVED = "resolved";
-  public static final String COMPONENTS = "components";
-  public static final String COMPONENT_KEYS = "componentKeys";
-  public static final String COMPONENT_UUIDS = "componentUuids";
-  public static final String COMPONENT_ROOTS = "componentRoots";
-  public static final String COMPONENT_ROOT_UUIDS = "componentRootUuids";
-  public static final String MODULE_UUIDS = "moduleUuids";
-  public static final String PROJECTS = "projects";
-  public static final String PROJECT_KEYS = "projectKeys";
-  public static final String PROJECT_UUIDS = "projectUuids";
-  public static final String DIRECTORIES = "directories";
-  public static final String FILE_UUIDS = "fileUuids";
-  public static final String ON_COMPONENT_ONLY = "onComponentOnly";
-  public static final String RULES = "rules";
-
-  /**
-   * @deprecated since 5.5, action plan feature has been removed
-   */
-  @Deprecated
-  public static final String DEPRECATED_ACTION_PLANS = "actionPlans";
-
-  /**
-   * @deprecated since 5.5, manual issue feature has been dropped.
-   */
-  @Deprecated
-  public static final String REPORTERS = "reporters";
-  public static final String ASSIGNEES = "assignees";
-  public static final String AUTHORS = "authors";
-  public static final String LANGUAGES = "languages";
-  public static final String TAGS = "tags";
-  public static final String TYPES = "types";
-  public static final String ASSIGNED = "assigned";
-
-  /**
-   * @deprecated since 5.5, action plan feature has been removed
-   */
-  @Deprecated
-  public static final String PLANNED = "planned";
-  public static final String HIDE_RULES = "hideRules";
-  public static final String HIDE_COMMENTS = "hideComments";
-  public static final String CREATED_AFTER = "createdAfter";
-  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";
-  public static final String ASC = "asc";
-  public static final String ADDITIONAL_FIELDS = "additionalFields";
-
-  public static final String FACET_MODE = "facetMode";
-  public static final String FACET_MODE_COUNT = "count";
-
-  /**
-   * @deprecated since 5.5, replaced by {@link #FACET_MODE_EFFORT}
-   */
-  @Deprecated
-  public static final String DEPRECATED_FACET_MODE_DEBT = "debt";
-  public static final String FACET_MODE_EFFORT = "effort";
-
-  public static final String FACET_ASSIGNED_TO_ME = "assigned_to_me";
-
-  public static final List<String> ALL = ImmutableList.of(ISSUES, SEVERITIES, STATUSES, RESOLUTIONS, RESOLVED,
-    COMPONENTS, COMPONENT_ROOTS, RULES, DEPRECATED_ACTION_PLANS, REPORTERS, TAGS, TYPES,
-    ASSIGNEES, LANGUAGES, ASSIGNED, PLANNED, HIDE_RULES, CREATED_AT, CREATED_AFTER, CREATED_BEFORE, CREATED_IN_LAST,
-    COMPONENT_UUIDS, COMPONENT_ROOT_UUIDS, FACET_MODE,
-    PROJECTS, PROJECT_UUIDS, PROJECT_KEYS, COMPONENT_KEYS, MODULE_UUIDS, DIRECTORIES, FILE_UUIDS, AUTHORS,
-    HIDE_COMMENTS, PAGE_SIZE, PAGE_INDEX, SORT, ASC);
-
-  public static final List<String> ALL_WITHOUT_PAGINATION = ImmutableList.copyOf(Iterables.filter(ALL, new Predicate<String>() {
-    @Override
-    public boolean apply(String input) {
-      return !PAGE_INDEX.equals(input) && !PAGE_SIZE.equals(input);
-    }
-  }));
-
-  private IssueFilterParameters() {
-    // Utility class
-  }
-}
index 080653b08b5765f83a75a2a475e4c5cebf5ead9a..976c112a69b6654a5ba13337fc1bbf8ca98b946e 100644 (file)
@@ -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/IssuesWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
new file mode 100644 (file)
index 0000000..c2e72e4
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonarqube.ws.client.issue;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import java.util.List;
+
+/**
+ * @since 5.3
+ */
+public class IssuesWsParameters {
+
+  public static final String ISSUES = "issues";
+  public static final String SEVERITIES = "severities";
+  public static final String STATUSES = "statuses";
+  public static final String RESOLUTIONS = "resolutions";
+  public static final String RESOLVED = "resolved";
+  public static final String COMPONENTS = "components";
+  public static final String COMPONENT_KEYS = "componentKeys";
+  public static final String COMPONENT_UUIDS = "componentUuids";
+  public static final String COMPONENT_ROOTS = "componentRoots";
+  public static final String COMPONENT_ROOT_UUIDS = "componentRootUuids";
+  public static final String MODULE_UUIDS = "moduleUuids";
+  public static final String PROJECTS = "projects";
+  public static final String PROJECT_KEYS = "projectKeys";
+  public static final String PROJECT_UUIDS = "projectUuids";
+  public static final String DIRECTORIES = "directories";
+  public static final String FILE_UUIDS = "fileUuids";
+  public static final String ON_COMPONENT_ONLY = "onComponentOnly";
+  public static final String RULES = "rules";
+
+  /**
+   * @deprecated since 5.5, action plan feature has been removed
+   */
+  @Deprecated
+  public static final String DEPRECATED_ACTION_PLANS = "actionPlans";
+
+  /**
+   * @deprecated since 5.5, manual issue feature has been dropped.
+   */
+  @Deprecated
+  public static final String REPORTERS = "reporters";
+  public static final String ASSIGNEES = "assignees";
+  public static final String AUTHORS = "authors";
+  public static final String LANGUAGES = "languages";
+  public static final String TAGS = "tags";
+  public static final String TYPES = "types";
+  public static final String ASSIGNED = "assigned";
+
+  /**
+   * @deprecated since 5.5, action plan feature has been removed
+   */
+  @Deprecated
+  public static final String PLANNED = "planned";
+  public static final String HIDE_RULES = "hideRules";
+  public static final String HIDE_COMMENTS = "hideComments";
+  public static final String CREATED_AFTER = "createdAfter";
+  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";
+  public static final String ASC = "asc";
+  public static final String ADDITIONAL_FIELDS = "additionalFields";
+
+  public static final String FACET_MODE = "facetMode";
+  public static final String FACET_MODE_COUNT = "count";
+
+  /**
+   * @deprecated since 5.5, replaced by {@link #FACET_MODE_EFFORT}
+   */
+  @Deprecated
+  public static final String DEPRECATED_FACET_MODE_DEBT = "debt";
+  public static final String FACET_MODE_EFFORT = "effort";
+
+  public static final String FACET_ASSIGNED_TO_ME = "assigned_to_me";
+
+  public static final List<String> ALL = ImmutableList.of(ISSUES, SEVERITIES, STATUSES, RESOLUTIONS, RESOLVED,
+    COMPONENTS, COMPONENT_ROOTS, RULES, DEPRECATED_ACTION_PLANS, REPORTERS, TAGS, TYPES,
+    ASSIGNEES, LANGUAGES, ASSIGNED, PLANNED, HIDE_RULES, CREATED_AT, CREATED_AFTER, CREATED_BEFORE, CREATED_IN_LAST,
+    COMPONENT_UUIDS, COMPONENT_ROOT_UUIDS, FACET_MODE,
+    PROJECTS, PROJECT_UUIDS, PROJECT_KEYS, COMPONENT_KEYS, MODULE_UUIDS, DIRECTORIES, FILE_UUIDS, AUTHORS,
+    HIDE_COMMENTS, PAGE_SIZE, PAGE_INDEX, SORT, ASC);
+
+  public static final List<String> ALL_WITHOUT_PAGINATION = ImmutableList.copyOf(Iterables.filter(ALL, new Predicate<String>() {
+    @Override
+    public boolean apply(String input) {
+      return !PAGE_INDEX.equals(input) && !PAGE_SIZE.equals(input);
+    }
+  }));
+
+  private IssuesWsParameters() {
+    // Utility class
+  }
+}