Package com.dropbox.core.v2.files
Class CommitInfo
- java.lang.Object
- 
- com.dropbox.core.v2.files.CommitInfo
 
- 
 public class CommitInfo extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classCommitInfo.BuilderBuilder forCommitInfo.
 - 
Field SummaryFields Modifier and Type Field Description protected booleanautorenameprotected java.util.DateclientModifiedprotected WriteModemodeprotected booleanmuteprotected java.lang.Stringpathprotected java.util.List<PropertyGroup>propertyGroupsprotected booleanstrictConflict
 - 
Constructor SummaryConstructors Constructor Description CommitInfo(java.lang.String path)NoneCommitInfo(java.lang.String path, WriteMode mode, boolean autorename, java.util.Date clientModified, boolean mute, java.util.List<PropertyGroup> propertyGroups, boolean strictConflict)UsenewBuilder(java.lang.String)to create instances of this class without specifying values for all optional fields.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleangetAutorename()If there's a conflict, as determined bygetMode(), have the Dropbox server try to autorename the file to avoid conflict.java.util.DategetClientModified()The value to store as thegetClientModified()timestamp.WriteModegetMode()Selects what to do if the file already exists.booleangetMute()Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software.java.lang.StringgetPath()Path in the user's Dropbox to save the file.java.util.List<PropertyGroup>getPropertyGroups()List of custom properties to add to file.booleangetStrictConflict()Be more strict about how eachWriteModedetects conflict.inthashCode()static CommitInfo.BuildernewBuilder(java.lang.String path)Returns a new builder for creating an instance of this class.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Field Detail- 
pathprotected final java.lang.String path 
 - 
modeprotected final WriteMode mode 
 - 
autorenameprotected final boolean autorename 
 - 
clientModifiedprotected final java.util.Date clientModified 
 - 
muteprotected final boolean mute 
 - 
propertyGroupsprotected final java.util.List<PropertyGroup> propertyGroups 
 - 
strictConflictprotected final boolean strictConflict 
 
- 
 - 
Constructor Detail- 
CommitInfopublic CommitInfo(java.lang.String path, WriteMode mode, boolean autorename, java.util.Date clientModified, boolean mute, java.util.List<PropertyGroup> propertyGroups, boolean strictConflict)UsenewBuilder(java.lang.String)to create instances of this class without specifying values for all optional fields.- Parameters:
- 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- nullitem.
- strictConflict- Be more strict about how each- WriteModedetects 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. This also forces a conflict even when the target path refers to a file with identical contents.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
CommitInfopublic CommitInfo(java.lang.String path) NoneThe default values for unset fields will be used. - Parameters:
- path- Path in the user's Dropbox to save the file. Must match pattern "- (/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be- null.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 
- 
 - 
Method Detail- 
getPathpublic java.lang.String getPath() Path in the user's Dropbox to save the file.- Returns:
- value for this field, never null.
 
 - 
getModepublic WriteMode getMode() Selects what to do if the file already exists.- Returns:
- value for this field, or nullif not present. Defaults to WriteMode.ADD.
 
 - 
getAutorenamepublic boolean getAutorename() If there's a conflict, as determined bygetMode(), have the Dropbox server try to autorename the file to avoid conflict.- Returns:
- value for this field, or nullif not present. Defaults to false.
 
 - 
getClientModifiedpublic java.util.Date getClientModified() The value to store as thegetClientModified()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:
- value for this field, or nullif not present.
 
 - 
getMutepublic boolean getMute() 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.- Returns:
- value for this field, or nullif not present. Defaults to false.
 
 - 
getPropertyGroupspublic java.util.List<PropertyGroup> getPropertyGroups() List of custom properties to add to file.- Returns:
- value for this field, or nullif not present.
 
 - 
getStrictConflictpublic boolean getStrictConflict() Be more strict about how eachWriteModedetects conflict. For example, always return a conflict error whengetMode()=WriteMode.getUpdateValue()and the given "rev" doesn't match the existing file's "rev", even if the existing file has been deleted. This also forces a conflict even when the target path refers to a file with identical contents.- Returns:
- value for this field, or nullif not present. Defaults to false.
 
 - 
newBuilderpublic static CommitInfo.Builder newBuilder(java.lang.String path) Returns a new builder for creating an instance of this class.- Parameters:
- path- Path in the user's Dropbox to save the file. Must match pattern "- (/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be- null.
- Returns:
- builder for this class.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String toStringMultiline() Returns a String representation of this object formatted for easier readability.The returned String may contain newlines. - Returns:
- Formatted, multiline String representation of this object
 
 
- 
 
-