Class DeletedMetadata

java.lang.Object
com.dropbox.core.v2.files.Metadata
com.dropbox.core.v2.files.DeletedMetadata

public class DeletedMetadata extends Metadata
Indicates that there used to be a file or folder at this path, but it no longer exists.
  • Constructor Details

    • DeletedMetadata

      public DeletedMetadata(@Nonnull String name, @Nullable String pathLower, @Nullable String pathDisplay, @Nullable String parentSharedFolderId, @Nullable String previewUrl)
      Indicates that there used to be a file or folder at this path, but it no longer exists.

      Use newBuilder(java.lang.String) to create instances of this class without specifying values for all optional fields.

      Parameters:
      name - The last component of the path (including extension). This never contains a slash. Must not be null.
      pathLower - The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
      pathDisplay - The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by DbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
      parentSharedFolderId - Field is deprecated. Please use FileSharingInfo.getParentSharedFolderId() or FolderSharingInfo.getParentSharedFolderId() instead. Must match pattern "[-_0-9a-zA-Z:]+".
      previewUrl - The preview URL of the file.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • DeletedMetadata

      public DeletedMetadata(@Nonnull String name)
      Indicates that there used to be a file or folder at this path, but it no longer exists.

      The default values for unset fields will be used.

      Parameters:
      name - The last component of the path (including extension). This never contains a slash. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getName

      @Nonnull public String getName()
      The last component of the path (including extension). This never contains a slash.
      Overrides:
      getName in class Metadata
      Returns:
      value for this field, never null.
    • getPathLower

      @Nullable public String getPathLower()
      The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
      Overrides:
      getPathLower in class Metadata
      Returns:
      value for this field, or null if not present.
    • getPathDisplay

      @Nullable public String getPathDisplay()
      The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by DbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
      Overrides:
      getPathDisplay in class Metadata
      Returns:
      value for this field, or null if not present.
    • getParentSharedFolderId

      @Deprecated @Nullable public String getParentSharedFolderId()
      Deprecated.
      Overrides:
      getParentSharedFolderId in class Metadata
      Returns:
      value for this field, or null if not present.
    • getPreviewUrl

      @Nullable public String getPreviewUrl()
      The preview URL of the file.
      Overrides:
      getPreviewUrl in class Metadata
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static DeletedMetadata.Builder newBuilder(String name)
      Returns a new builder for creating an instance of this class.
      Parameters:
      name - The last component of the path (including extension). This never contains a slash. Must not be null.
      Returns:
      builder for this class.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Metadata
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Metadata
    • toString

      public String toString()
      Overrides:
      toString in class Metadata
    • toStringMultiline

      public String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.

      The returned String may contain newlines.

      Overrides:
      toStringMultiline in class Metadata
      Returns:
      Formatted, multiline String representation of this object