public class CommitInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CommitInfo.Builder
Builder for
CommitInfo . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
autorename |
protected java.util.Date |
clientModified |
protected WriteMode |
mode |
protected boolean |
mute |
protected java.lang.String |
path |
protected java.util.List<PropertyGroup> |
propertyGroups |
protected boolean |
strictConflict |
Constructor and Description |
---|
CommitInfo(java.lang.String path)
None
|
CommitInfo(java.lang.String path,
WriteMode mode,
boolean autorename,
java.util.Date clientModified,
boolean mute,
java.util.List<PropertyGroup> propertyGroups,
boolean strictConflict)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
getAutorename()
If there's a conflict, as determined by
getMode() , have
the Dropbox server try to autorename the file to avoid conflict. |
java.util.Date |
getClientModified()
The value to store as the
getClientModified() 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.
|
java.lang.String |
getPath()
Path in the user's Dropbox to save the file.
|
java.util.List<PropertyGroup> |
getPropertyGroups()
List of custom properties to add to file.
|
boolean |
getStrictConflict()
Be more strict about how each
WriteMode detects conflict. |
int |
hashCode() |
static CommitInfo.Builder |
newBuilder(java.lang.String path)
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final java.lang.String path
protected final WriteMode mode
protected final boolean autorename
protected final java.util.Date clientModified
protected final boolean mute
protected final java.util.List<PropertyGroup> propertyGroups
protected final boolean strictConflict
public CommitInfo(java.lang.String path, WriteMode mode, boolean autorename, java.util.Date clientModified, boolean mute, java.util.List<PropertyGroup> propertyGroups, boolean strictConflict)
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])*)|(ns:[0-9]+(/.*)?)|(id:.*)
" and not
be null
.mode
- Selects what to do if the file already exists. Must not be
null
.autorename
- If there's a conflict, as determined by getMode()
, have the Dropbox server try to autorename the
file to avoid conflict.clientModified
- The value to store as the 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.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.propertyGroups
- List of custom properties to add to file. Must not
contain a null
item.strictConflict
- Be more strict about how each WriteMode
detects conflict. For example, always return a conflict error when
getMode()
= WriteMode.getUpdateValue()
and the
given "rev" doesn't match the existing file's "rev", even if the
existing file has been deleted.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public CommitInfo(java.lang.String path)
The default values for unset fields will be used.
path
- Path in the user's Dropbox to save the file. Must match
pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)
" and not
be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.lang.String getPath()
null
.public WriteMode getMode()
null
if not present. Defaults to
WriteMode.ADD.public boolean getAutorename()
getMode()
, have
the Dropbox server try to autorename the file to avoid conflict.null
if not present. Defaults to
false.public java.util.Date getClientModified()
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.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 java.util.List<PropertyGroup> getPropertyGroups()
null
if not present.public boolean getStrictConflict()
WriteMode
detects conflict. For
example, always return a conflict error when getMode()
=
WriteMode.getUpdateValue()
and the given "rev" doesn't match the
existing file's "rev", even if the existing file has been deleted.null
if not present. Defaults to
false.public static CommitInfo.Builder newBuilder(java.lang.String path)
path
- Path in the user's Dropbox to save the file. Must match
pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)
" and not
be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.