Package com.dropbox.core.v2.files
Class AlphaUploadBuilder
- java.lang.Object
-
- com.dropbox.core.v2.DbxUploadStyleBuilder<FileMetadata,UploadErrorWithProperties,UploadErrorWithPropertiesException>
-
- com.dropbox.core.v2.files.AlphaUploadBuilder
-
public class AlphaUploadBuilder extends DbxUploadStyleBuilder<FileMetadata,UploadErrorWithProperties,UploadErrorWithPropertiesException>
The request builder returned byDbxUserFilesRequests.alphaUploadBuilder(java.lang.String)
.Use this class to set optional request parameters and complete the request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlphaUploadUploader
start()
Begins the upload request using this builder's request parameters and returns aDbxUploader
for writing the request body.AlphaUploadBuilder
withAutorename(java.lang.Boolean autorename)
Set value for optional field.AlphaUploadBuilder
withClientModified(java.util.Date clientModified)
Set value for optional field.AlphaUploadBuilder
withMode(WriteMode mode)
Set value for optional field.AlphaUploadBuilder
withMute(java.lang.Boolean mute)
Set value for optional field.AlphaUploadBuilder
withPropertyGroups(java.util.List<PropertyGroup> propertyGroups)
Set value for optional field.AlphaUploadBuilder
withStrictConflict(java.lang.Boolean strictConflict)
Set value for optional field.-
Methods inherited from class com.dropbox.core.v2.DbxUploadStyleBuilder
uploadAndFinish, uploadAndFinish, uploadAndFinish, uploadAndFinish
-
-
-
-
Method Detail
-
withMode
public AlphaUploadBuilder withMode(WriteMode mode)
Set value for optional field.If left unset or set to
null
, defaults toWriteMode.ADD
.- Parameters:
mode
- Selects what to do if the file already exists. Must not benull
. Defaults toWriteMode.ADD
when set tonull
.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withAutorename
public AlphaUploadBuilder withAutorename(java.lang.Boolean autorename)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
autorename
- If there's a conflict, as determined byCommitInfo.getMode()
, have the Dropbox server try to autorename the file to avoid conflict. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
withClientModified
public AlphaUploadBuilder withClientModified(java.util.Date clientModified)
Set value for optional field.- Parameters:
clientModified
- The value to store as theCommitInfo.getClientModified()
timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.- Returns:
- this builder
-
withMute
public AlphaUploadBuilder withMute(java.lang.Boolean mute)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
mute
- Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. Iftrue
, this tells the clients that this modification shouldn't result in a user notification. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
withPropertyGroups
public AlphaUploadBuilder withPropertyGroups(java.util.List<PropertyGroup> propertyGroups)
Set value for optional field.- Parameters:
propertyGroups
- List of custom properties to add to file. Must not contain anull
item.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withStrictConflict
public AlphaUploadBuilder withStrictConflict(java.lang.Boolean strictConflict)
Set value for optional field.If left unset or set to
null
, defaults tofalse
.- Parameters:
strictConflict
- Be more strict about how eachWriteMode
detects conflict. For example, always return a conflict error whenCommitInfo.getMode()
=WriteMode.getUpdateValue()
and the given "rev" doesn't match the existing file's "rev", even if the existing file has been deleted. Defaults tofalse
when set tonull
.- Returns:
- this builder
-
start
public AlphaUploadUploader start() throws UploadErrorWithPropertiesException, DbxException
Description copied from class:DbxUploadStyleBuilder
Begins the upload request using this builder's request parameters and returns aDbxUploader
for writing the request body. Callers can complete the request by writing the upload data to theOutputStream
returned byDbxUploader.getOutputStream()
and receiving the server response usingDbxUploader.finish()
. SeeDbxUploadStyleBuilder.uploadAndFinish(java.io.InputStream)
convenience method for a simpler way to complete the request.- Specified by:
start
in classDbxUploadStyleBuilder<FileMetadata,UploadErrorWithProperties,UploadErrorWithPropertiesException>
- Returns:
DbxUploader
used to upload data and complete the request- Throws:
DbxException
- if an error occursing initializing the requestUploadErrorWithPropertiesException
-
-