/* * $HeadURL$ * $Id$ * * Copyright (c) 2006-2011 by Public Library of Science * http://plos.org * http://ambraproject.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. | */ package org.ambraproject.service.search; import org.w3c.dom.Document; import java.util.Map; /** * Make various http requests to a SOLR server. This provides lower level access to the SOLR server * versus the SolrSearchService class * * @author Alex Kudlick * @author Joe Osowski * */ public interface SolrHttpService { /** * Basic method for making a request to the Solr server, with a Map of key/value pairs to pass as parameters * * @param params the params to pass to solr. these are URL encoded and passed as part of the get request * @return A Document wrapper around the Solr response */ public Document makeSolrRequest(Map<String, String> params) throws SolrException; public Document makeSolrRequestForRss(String queryString) throws SolrException; /** * Basic method for making a post request to the Solr server, with a Map of key/value pairs to pass as parameters * * @param params the params to pass to solr. these are URL encoded and passed as part of the get request * @param data the data to pass via a HTTP put * @param isCSV is the data CSV? */ public void makeSolrPostRequest(Map<String, String> params, String data, boolean isCSV) throws SolrException; }