Package org.apache.solr.client.solrj.request

# Class CollectionRequiringSolrRequest<T>

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<T>
org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest<T>

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `AbstractSchemaRequest`, `AbstractUpdateRequest`, `DocumentAnalysisRequest`, `FieldAnalysisRequest`, `LukeRequest`, `QueryRequest`, `SolrPing`

public abstract class CollectionRequiringSolrRequest<T> extends SolrRequest<T>
Parent `SolrRequest` class that requires a target collection or core.

See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

`SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

## Field Summary

### Fields inherited from class org.apache.solr.client.solrj.SolrRequest

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`CollectionRequiringSolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`requiresCollection()`
Determines whether this request should use or ignore any specified collections (esp.

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`addHeader, addHeaders, createResponse, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getParams, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CollectionRequiringSolrRequest

public CollectionRequiringSolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType)

## Method Details

### requiresCollection

public boolean requiresCollection()
Description copied from class: `SolrRequest`
Determines whether this request should use or ignore any specified collections (esp. `SolrClient.defaultCollection`)

Many Solr requests target a particular core or collection. But not all of them - many Solr APIs (e.g. security or other admin APIs) are agnostic of collections entirely. This method gives these requests a way to opt out of using `SolrClient.defaultCollection` or other specified collections.

Overrides:
  `requiresCollection` in class `SolrRequest<T>`