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

## Class ConfigSetAdminRequest.Upload

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<R>
  - - org.apache.solr.client.solrj.request.ConfigSetAdminRequest<T,​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 modifing 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.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

### Field Summary

Fields
`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, useBinaryV2, usev2`

### Constructor Summary

Constructors
`Upload()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Boolean` `getCleanup()`
`Collection<ContentStream>` `getContentStreams()`
`RequestWriter.ContentWriter` `getContentWriter​(String expectedType)` If a request object wants to do a push write, implement this method.
`String` `getFilePath()`
`Boolean` `getOverwrite()`
`SolrParams` `getParams()`
`protected ConfigSetAdminRequest.Upload` `getThis()`
`ConfigSetAdminRequest.Upload` `setCleanup​(Boolean cleanup)`
`ConfigSetAdminRequest.Upload` `setFilePath​(String filePath)` Optional `ConfigSetParams.FILE_PATH` to indicate a single file is being uploaded into an existing configset
`ConfigSetAdminRequest.Upload` `setOverwrite​(Boolean overwrite)`
`ConfigSetAdminRequest.Upload` `setUploadFile​(File file, String contentType)` A convinience method for specifying an existing File to use as the upload data.
`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

`getRequestType, setAction`

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

`addHeader, addHeaders, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2`

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

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

### Field Detail

#### stream

    protected ContentStream stream

#### filePath

    protected String filePath

#### overwrite

    protected Boolean overwrite

#### cleanup

    protected Boolean cleanup

### Constructor Detail

#### Upload

    public Upload()

### Method Detail

#### 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​(File file,
                                                            String contentType)

A convinience 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.

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()

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