Enum WriteMode.Tag

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<WriteMode.Tag>
    Enclosing class:
    WriteMode

    public static enum WriteMode.Tag
    extends java.lang.Enum<WriteMode.Tag>
    Discriminating tag type for WriteMode.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ADD
      Do not overwrite an existing file if there is a conflict.
      OVERWRITE
      Always overwrite the existing file.
      UPDATE
      Overwrite if the given "rev" matches the existing file's "rev".
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static WriteMode.Tag valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static WriteMode.Tag[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ADD

        public static final WriteMode.Tag ADD
        Do not overwrite an existing file if there is a conflict. The autorename strategy is to append a number to the file name. For example, "document.txt" might become "document (2).txt".
      • OVERWRITE

        public static final WriteMode.Tag OVERWRITE
        Always overwrite the existing file. The autorename strategy is the same as it is for WriteMode.ADD.
      • UPDATE

        public static final WriteMode.Tag UPDATE
        Overwrite if the given "rev" matches the existing file's "rev". The supplied value should be the latest known "rev" of the file, for example, from FileMetadata, from when the file was last downloaded by the app. This will cause the file on the Dropbox servers to be overwritten if the given "rev" matches the existing file's current "rev" on the Dropbox servers. The autorename strategy is to append the string "conflicted copy" to the file name. For example, "document.txt" might become "document (conflicted copy).txt" or "document (Panda's conflicted copy).txt".
    • Method Detail

      • values

        public static WriteMode.Tag[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (WriteMode.Tag c : WriteMode.Tag.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static WriteMode.Tag valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null