Package com.dropbox.core.v2.files
Class CommitInfo.Builder
java.lang.Object
com.dropbox.core.v2.files.CommitInfo.Builder
- Enclosing class:
CommitInfo
Builder for
CommitInfo.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Dateprotected WriteModeprotected booleanprotected final Stringprotected List<PropertyGroup> protected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofCommitInfoconfigured with this builder's valueswithAutorename(Boolean autorename) Set value for optional field.withClientModified(Date clientModified) Set value for optional field.Set value for optional field.Set value for optional field.withPropertyGroups(List<PropertyGroup> propertyGroups) Set value for optional field.withStrictConflict(Boolean strictConflict) Set value for optional field.
-
Field Details
-
path
-
mode
-
autorename
protected boolean autorename -
clientModified
-
mute
protected boolean mute -
propertyGroups
-
strictConflict
protected boolean strictConflict
-
-
Constructor Details
-
Builder
-
-
Method Details
-
withMode
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 benull. Defaults toWriteMode.ADDwhen set tonull.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withAutorename
Set value for optional field.If left unset or set to
null, defaults tofalse.- Parameters:
autorename- If there's a conflict, as determined byCommitInfo.getMode(), have the Dropbox server try to autorename the file to avoid conflict. Defaults tofalsewhen set tonull.- Returns:
- this builder
-
withClientModified
Set value for optional field.- Parameters:
clientModified- The value to store as theCommitInfo.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
-
withMute
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. Iftrue, this tells the clients that this modification shouldn't result in a user notification. Defaults tofalsewhen set tonull.- Returns:
- this builder
-
withPropertyGroups
Set value for optional field.- Parameters:
propertyGroups- List of custom properties to add to file. Must not contain anullitem.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withStrictConflict
Set value for optional field.If left unset or set to
null, defaults tofalse.- Parameters:
strictConflict- Be more strict about how eachWriteModedetects conflict. For example, always return a conflict error whenCommitInfo.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 tofalsewhen set tonull.- Returns:
- this builder
-
build
Builds an instance ofCommitInfoconfigured with this builder's values- Returns:
- new instance of
CommitInfo
-