Class CommitInfo


  • public class CommitInfo
    extends java.lang.Object
    • Field Detail

      • path

        protected final java.lang.String path
      • autorename

        protected final boolean autorename
      • clientModified

        protected final java.util.Date clientModified
      • mute

        protected final boolean mute
      • propertyGroups

        protected final java.util.List<PropertyGroup> propertyGroups
      • strictConflict

        protected final boolean strictConflict
    • Constructor Detail

      • CommitInfo

        public CommitInfo​(java.lang.String path,
                          WriteMode mode,
                          boolean autorename,
                          java.util.Date clientModified,
                          boolean mute,
                          java.util.List<PropertyGroup> propertyGroups,
                          boolean strictConflict)
        Use newBuilder(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 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. 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.
      • CommitInfo

        public CommitInfo​(java.lang.String path)
        None

        The 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

      • getPath

        public java.lang.String getPath()
        Path in the user's Dropbox to save the file.
        Returns:
        value for this field, never null.
      • getMode

        public WriteMode getMode()
        Selects what to do if the file already exists.
        Returns:
        value for this field, or null if not present. Defaults to WriteMode.ADD.
      • getAutorename

        public boolean getAutorename()
        If there's a conflict, as determined by getMode(), have the Dropbox server try to autorename the file to avoid conflict.
        Returns:
        value for this field, or null if not present. Defaults to false.
      • getClientModified

        public java.util.Date getClientModified()
        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.
        Returns:
        value for this field, or null if not present.
      • getMute

        public boolean getMute()
        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.
        Returns:
        value for this field, or null if not present. Defaults to false.
      • getPropertyGroups

        public java.util.List<PropertyGroup> getPropertyGroups()
        List of custom properties to add to file.
        Returns:
        value for this field, or null if not present.
      • getStrictConflict

        public boolean getStrictConflict()
        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. This also forces a conflict even when the target path refers to a file with identical contents.
        Returns:
        value for this field, or null if not present. Defaults to false.
      • newBuilder

        public 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public 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