Package com.dropbox.core.v2.files
Class CommitInfo.Builder
- java.lang.Object
- 
- com.dropbox.core.v2.files.CommitInfo.Builder
 
- 
- Enclosing class:
- CommitInfo
 
 public static class CommitInfo.Builder extends java.lang.ObjectBuilder 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 Modifier Constructor Description protectedBuilder(java.lang.String path)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CommitInfobuild()Builds an instance ofCommitInfoconfigured with this builder's valuesCommitInfo.BuilderwithAutorename(java.lang.Boolean autorename)Set value for optional field.CommitInfo.BuilderwithClientModified(java.util.Date clientModified)Set value for optional field.CommitInfo.BuilderwithMode(WriteMode mode)Set value for optional field.CommitInfo.BuilderwithMute(java.lang.Boolean mute)Set value for optional field.CommitInfo.BuilderwithPropertyGroups(java.util.List<PropertyGroup> propertyGroups)Set value for optional field.CommitInfo.BuilderwithStrictConflict(java.lang.Boolean strictConflict)Set value for optional field.
 
- 
- 
- 
Field Detail- 
pathprotected final java.lang.String path 
 - 
modeprotected WriteMode mode 
 - 
autorenameprotected boolean autorename 
 - 
clientModifiedprotected java.util.Date clientModified 
 - 
muteprotected boolean mute 
 - 
propertyGroupsprotected java.util.List<PropertyGroup> propertyGroups 
 - 
strictConflictprotected boolean strictConflict 
 
- 
 - 
Method Detail- 
withModepublic CommitInfo.Builder 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 be- null. Defaults to- WriteMode.ADDwhen set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withAutorenamepublic CommitInfo.Builder 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 by- CommitInfo.getMode(), have the Dropbox server try to autorename the file to avoid conflict. Defaults to- falsewhen set to- null.
- Returns:
- this builder
 
 - 
withClientModifiedpublic CommitInfo.Builder withClientModified(java.util.Date clientModified) Set value for optional field.- Parameters:
- 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.
- Returns:
- this builder
 
 - 
withMutepublic CommitInfo.Builder 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. If- true, this tells the clients that this modification shouldn't result in a user notification. Defaults to- falsewhen set to- null.
- Returns:
- this builder
 
 - 
withPropertyGroupspublic CommitInfo.Builder withPropertyGroups(java.util.List<PropertyGroup> propertyGroups) Set value for optional field.- Parameters:
- propertyGroups- List of custom properties to add to file. Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withStrictConflictpublic CommitInfo.Builder 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 each- WriteModedetects conflict. For example, always return a conflict error when- CommitInfo.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. Defaults to- falsewhen set to- null.
- Returns:
- this builder
 
 - 
buildpublic CommitInfo build() Builds an instance ofCommitInfoconfigured with this builder's values- Returns:
- new instance of CommitInfo
 
 
- 
 
-