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

# Class ConfigSetAdminRequest.Upload

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<ConfigSetAdminResponse>
org.apache.solr.client.solrj.request.ConfigSetAdminRequest<ConfigSetAdminRequest.Upload,ConfigSetAdminResponse>
org.apache.solr.client.solrj.request.ConfigSetAdminRequest.ConfigSetSpecificAdminRequest<ConfigSetAdminRequest.Upload>
org.apache.solr.client.solrj.request.ConfigSetAdminRequest.Upload

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  `ConfigSetAdminRequest<Q extends ConfigSetAdminRequest<Q,R>,R extends ConfigSetAdminResponse>`

public static class ConfigSetAdminRequest.Upload extends ConfigSetAdminRequest.ConfigSetSpecificAdminRequest<ConfigSetAdminRequest.Upload>
Uploads files to create a new configset, or modify an existing config set.

When creating a new configset, the file to be uploaded must be a ZIP file containing the entire configset being uploaded. When modifying an existing configset, the file to be uploaded should either be a ZIP file containing the entire configset being uploaded, or an individual file to upload if `setFilePath(java.lang.String)` is being used.

See Also:
  - Serialized Form

## Nested Class Summary

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

`ConfigSetAdminRequest.ConfigSetSpecificAdminRequest<T extends ConfigSetAdminRequest<T,ConfigSetAdminResponse>>, ConfigSetAdminRequest.Create, ConfigSetAdminRequest.Delete, ConfigSetAdminRequest.List, ConfigSetAdminRequest.Upload`

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

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

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Boolean`
`cleanup`
`protected String`
`filePath`
`protected Boolean`
`overwrite`
`protected ContentStream`
`stream`

### Fields inherited from class org.apache.solr.client.solrj.request.ConfigSetAdminRequest.ConfigSetSpecificAdminRequest

`configSetName`

### Fields inherited from class org.apache.solr.client.solrj.request.ConfigSetAdminRequest

`action`

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

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`Upload()`

## Method Summary

Modifier and Type
Method
Description
`final Boolean`
`getCleanup()`
`Collection<ContentStream>`
`getContentStreams()`
`RequestWriter.ContentWriter`
`getContentWriter(String expectedType)`
If a request object wants to do a push write, implement this method.
`final String`
`getFilePath()`
`final Boolean`
`getOverwrite()`
`SolrParams`
`getParams()`
The parameters for this request; never null.
`protected ConfigSetAdminRequest.Upload`
`getThis()`
`final ConfigSetAdminRequest.Upload`
`setCleanup(Boolean cleanup)`
`final ConfigSetAdminRequest.Upload`
`setFilePath(String filePath)`
Optional `ConfigSetParams.FILE_PATH` to indicate a single file is being uploaded into an existing configset
`final ConfigSetAdminRequest.Upload`
`setOverwrite(Boolean overwrite)`
`final ConfigSetAdminRequest.Upload`
`setUploadFile(Path file, String contentType)`
A convenience method for specifying an existing File to use as the upload data.
`final ConfigSetAdminRequest.Upload`
`setUploadStream(ContentStream stream)`
Specify the ContentStream to upload.

### Methods inherited from class org.apache.solr.client.solrj.request.ConfigSetAdminRequest.ConfigSetSpecificAdminRequest

`createResponse, getConfigSetName, setConfigSetName`

### Methods inherited from class org.apache.solr.client.solrj.request.ConfigSetAdminRequest

`setAction`

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

`addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, requiresCollection, 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`

## Field Details

### stream

protected ContentStream stream

### filePath

protected String filePath

### overwrite

protected Boolean overwrite

### cleanup

protected Boolean cleanup

## Constructor Details

### Upload

public Upload()

## Method Details

### getThis

protected ConfigSetAdminRequest.Upload getThis()

Specified by:
  `getThis` in class `ConfigSetAdminRequest<ConfigSetAdminRequest.Upload,ConfigSetAdminResponse>`

### setFilePath

public final ConfigSetAdminRequest.Upload setFilePath(String filePath)
Optional `ConfigSetParams.FILE_PATH` to indicate a single file is being uploaded into an existing configset

### getFilePath

public final String getFilePath()

See Also:
  - `setFilePath(java.lang.String)`

### setUploadFile

public final ConfigSetAdminRequest.Upload setUploadFile(Path file, String contentType) throws IOException
A convenience method for specifying an existing File to use as the upload data.

This should either be a ZIP file containing the entire configset being uploaded, or an individual file to upload into an existing configset if `setFilePath(java.lang.String)` is being used.

Throws:
  `IOException`
See Also:
  - `setUploadStream(org.apache.solr.common.util.ContentStream)`

### setOverwrite

public final ConfigSetAdminRequest.Upload setOverwrite(Boolean overwrite)

See Also:
  - `ConfigSetParams.OVERWRITE`

### getOverwrite

public final Boolean getOverwrite()

See Also:
  - `setOverwrite(java.lang.Boolean)`

### setCleanup

public final ConfigSetAdminRequest.Upload setCleanup(Boolean cleanup)

See Also:
  - `ConfigSetParams.CLEANUP`

### getCleanup

public final Boolean getCleanup()

See Also:
  - `setCleanup(java.lang.Boolean)`

### setUploadStream

public final ConfigSetAdminRequest.Upload setUploadStream(ContentStream stream)
Specify the ContentStream to upload.

This should either be a ZIP file containing the entire configset being uploaded, or an individual file to upload into an existing configset if `setFilePath(java.lang.String)` is being used.

See Also:
  - `setUploadStream(org.apache.solr.common.util.ContentStream)`

### getContentStreams

public Collection<ContentStream> getContentStreams() throws IOException

Overrides:
  `getContentStreams` in class `SolrRequest<ConfigSetAdminResponse>`
Throws:
  `IOException`

### getContentWriter

public RequestWriter.ContentWriter getContentWriter(String expectedType)
Description copied from class: `SolrRequest`
If a request object wants to do a push write, implement this method.

Overrides:
  `getContentWriter` in class `SolrRequest<ConfigSetAdminResponse>`
Parameters:
  `expectedType` - This is the type that the RequestWriter would like to get. But, it is OK to send any format

### getParams

public SolrParams getParams()
Description copied from class: `SolrRequest`
The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this `SolrRequest` instance, as it may return a new instance here every time. If the subclass specifies the response type as `ModifiableSolrParams`, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.

Overrides:
  `getParams` in class `ConfigSetAdminRequest.ConfigSetSpecificAdminRequest<ConfigSetAdminRequest.Upload>`