Example usage for org.apache.solr.client.solrj SolrRequest getBasicAuthPassword

List of usage examples for org.apache.solr.client.solrj SolrRequest getBasicAuthPassword

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj SolrRequest getBasicAuthPassword.

Prototype

public String getBasicAuthPassword() 

Source Link

Usage

From source file:com.ilscipio.scipio.solr.util.ScipioHttpSolrClient.java

License:Apache License

/**
 * Sets basic auth header to either the one in the SolrRequest or the one stored in this client.
 * <p>/*from   ww w  .  ja  v  a 2  s . c o  m*/
 * DEV NOTE: Derived from {@link HttpSolrClient#setBasicAuthHeader}, which is private in superclass.
 */
@SuppressWarnings("rawtypes")
protected void setBasicAuthHeaderScipio(SolrRequest request, HttpRequestBase method)
        throws UnsupportedEncodingException {
    if (request.getBasicAuthUser() != null && request.getBasicAuthPassword() != null) {
        setBasicAuthHeader(method, request.getBasicAuthUser(), request.getBasicAuthPassword());
    } else if (this.solrUsername != null && this.solrPassword != null) {
        setBasicAuthHeader(method, this.solrUsername, this.solrPassword);
    }
}