public class CommitInfo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CommitInfo.Builder
Builder for
CommitInfo . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
autorename |
protected Date |
clientModified |
protected WriteMode |
mode |
protected boolean |
mute |
protected String |
path |
Constructor and Description |
---|
CommitInfo(String path)
The default values for unset fields will be used.
|
CommitInfo(String path,
WriteMode mode,
boolean autorename,
Date clientModified,
boolean mute)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
getAutorename()
If there's a conflict, as determined by the
mode argument to
DbxUserFilesRequests.upload(String) , have the Dropbox server try
to autorename the file to avoid conflict. |
Date |
getClientModified()
The value to store as the the
clientModified argument to DbxUserFilesRequests.upload(String) timestamp. |
WriteMode |
getMode()
Selects what to do if the file already exists.
|
boolean |
getMute()
Normally, users are made aware of any file modifications in their Dropbox
account via notifications in the client software.
|
String |
getPath()
Path in the user's Dropbox to save the file.
|
int |
hashCode() |
static CommitInfo.Builder |
newBuilder(String path)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String path
protected final WriteMode mode
protected final boolean autorename
protected final Date clientModified
protected final boolean mute
public CommitInfo(String path, WriteMode mode, boolean autorename, Date clientModified, boolean mute)
newBuilder
to create instances of this class without
specifying values for all optional fields.path
- Path in the user's Dropbox to save the file. Must match
pattern "/(.|[\\r\\n])*
" and not be null
.mode
- Selects what to do if the file already exists.autorename
- If there's a conflict, as determined by the mode
argument to DbxUserFilesRequests.upload(String)
, have
the Dropbox server try to autorename the file to avoid conflict.clientModified
- The value to store as the the clientModified
argument to DbxUserFilesRequests.upload(String)
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.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.IllegalArgumentException
- If any argument does not meet its
preconditions.public CommitInfo(String path)
path
- Path in the user's Dropbox to save the file. Must match
pattern "/(.|[\\r\\n])*
" and not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getPath()
null
.public WriteMode getMode()
null
if not present. Defaults to
WriteMode.ADD.public boolean getAutorename()
mode
argument to
DbxUserFilesRequests.upload(String)
, have the Dropbox server try
to autorename the file to avoid conflict.null
if not present. Defaults to
false.public Date getClientModified()
clientModified
argument to DbxUserFilesRequests.upload(String)
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.null
if not present.public boolean getMute()
true
, this
tells the clients that this modification shouldn't result in a user
notification.null
if not present. Defaults to
false.public static CommitInfo.Builder newBuilder(String path)
path
- Path in the user's Dropbox to save the file. Must match
pattern "/(.|[\\r\\n])*
" and not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String toStringMultiline()
The returned String may contain newlines.