]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5531 - Removed not needed IssueMapping (Using legacy writer for API Compatibility)
authorStephane Gamard <stephane.gamard@sonarsource.com>
Thu, 4 Sep 2014 14:06:07 +0000 (16:06 +0200)
committerStephane Gamard <stephane.gamard@sonarsource.com>
Thu, 4 Sep 2014 14:06:07 +0000 (16:06 +0200)
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueMapping.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java

diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueMapping.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueMapping.java
deleted file mode 100644 (file)
index ce40c4d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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.sonar.server.issue.index;
-
-import org.sonar.server.search.ws.BaseMapping;
-
-public class IssueMapping extends BaseMapping<IssueDoc, IssueMappingContext> {
-
-}
-
-class IssueMappingContext {
-
-}
index cd7f0f7c972276307e8da6d2efeaf41f6a3eccd2..588bcee260739259c8d8978171f7b41689560a42 100644 (file)
@@ -22,7 +22,6 @@ package org.sonar.server.issue.ws;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
 import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
 import com.google.common.io.Resources;
 import org.sonar.api.component.Component;
@@ -50,7 +49,6 @@ import org.sonar.core.component.ComponentDto;
 import org.sonar.markdown.Markdown;
 import org.sonar.server.issue.IssueService;
 import org.sonar.server.issue.filter.IssueFilterParameters;
-import org.sonar.server.issue.index.IssueMapping;
 import org.sonar.server.issue.index.IssueResult;
 import org.sonar.server.search.QueryOptions;
 import org.sonar.server.search.ws.SearchOptions;
@@ -80,14 +78,12 @@ public class SearchAction implements RequestHandler {
   public static final String PARAM_FACETS = "facets";
 
   private final IssueService service;
-  private final IssueMapping mapping;
   private final IssueActionsWriter actionsWriter;
   private final I18n i18n;
   private final Durations durations;
 
-  public SearchAction(IssueService service, IssueMapping mapping, IssueActionsWriter actionsWriter, I18n i18n, Durations durations) {
+  public SearchAction(IssueService service, IssueActionsWriter actionsWriter, I18n i18n, Durations durations) {
     this.service = service;
-    this.mapping = mapping;
     this.actionsWriter = actionsWriter;
     this.i18n = i18n;
     this.durations = durations;
@@ -103,8 +99,6 @@ public class SearchAction implements RequestHandler {
 
     // Add globalized search options. Will also support legacy params
     // Generic search parameters
-    SearchOptions.defineFieldsParam(action,
-      ImmutableList.<String>builder().addAll(mapping.supportedFields()).build());
     SearchOptions.definePageParams(action);
 
     // Issue-specific search parameters
@@ -206,7 +200,7 @@ public class SearchAction implements RequestHandler {
     IssueQuery query = createQuery(request);
     SearchOptions searchOptions = SearchOptions.create(request);
     QueryOptions queryOptions = new QueryOptions();
-    mapping.newQueryOptions(searchOptions);
+    queryOptions.setPage(searchOptions.page(), searchOptions.pageSize());
     queryOptions.setFacet(request.mandatoryParamAsBoolean(PARAM_FACETS));
 
     IssueResult results = service.search(query, queryOptions);