public static class CommitInfo.Builder extends Object
CommitInfo
.Modifier and Type | Field and Description |
---|---|
protected boolean |
autorename |
protected Date |
clientModified |
protected WriteMode |
mode |
protected boolean |
mute |
protected String |
path |
Modifier | Constructor and Description |
---|---|
protected |
Builder(String path) |
Modifier and Type | Method and Description |
---|---|
CommitInfo |
build()
Builds an instance of
CommitInfo configured with this
builder's values |
CommitInfo.Builder |
withAutorename(Boolean autorename)
Set value for optional field.
|
CommitInfo.Builder |
withClientModified(Date clientModified)
Set value for optional field.
|
CommitInfo.Builder |
withMode(WriteMode mode)
Set value for optional field.
|
CommitInfo.Builder |
withMute(Boolean mute)
Set value for optional field.
|
protected final String path
protected WriteMode mode
protected boolean autorename
protected Date clientModified
protected boolean mute
protected Builder(String path)
public CommitInfo.Builder withMode(WriteMode mode)
If left unset or set to null
, defaults to WriteMode.ADD
.
mode
- Selects what to do if the file already exists. Must not
be null
. Defaults to WriteMode.ADD
when set to
null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public CommitInfo.Builder withAutorename(Boolean autorename)
If left unset or set to null
, defaults to false
.
autorename
- If there's a conflict, as determined by CommitInfo.getMode()
, have the Dropbox server try to autorename
the file to avoid conflict. Defaults to false
when set to
null
.public CommitInfo.Builder withClientModified(Date clientModified)
clientModified
- The value to store as the CommitInfo.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.public CommitInfo.Builder withMute(Boolean mute)
If left unset or set to null
, defaults to false
.
mute
- Normally, users are made aware of any file modifications
in their Dropbox account via notifications in the client
software. If true
, this tells the clients that this
modification shouldn't result in a user notification. Defaults to
false
when set to null
.public CommitInfo build()
CommitInfo
configured with this
builder's valuesCommitInfo