+++ /dev/null
-/*
- * 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 {
-
-}
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;
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;
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;
// 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
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);