Class PathLinkMetadata

java.lang.Object
com.dropbox.core.v2.sharing.LinkMetadata
com.dropbox.core.v2.sharing.PathLinkMetadata

public class PathLinkMetadata extends LinkMetadata
Metadata for a path-based shared link.
  • Field Details

    • path

      @Nonnull protected final String path
  • Constructor Details

    • PathLinkMetadata

      public PathLinkMetadata(@Nonnull String url, @Nonnull Visibility visibility, @Nonnull String path, @Nullable Date expires)
      Metadata for a path-based shared link.
      Parameters:
      url - URL of the shared link. Must not be null.
      visibility - Who can access the link. Must not be null.
      path - Path in user's Dropbox. Must not be null.
      expires - Expiration time, if set. By default the link won't expire.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • PathLinkMetadata

      public PathLinkMetadata(@Nonnull String url, @Nonnull Visibility visibility, @Nonnull String path)
      Metadata for a path-based shared link.

      The default values for unset fields will be used.

      Parameters:
      url - URL of the shared link. Must not be null.
      visibility - Who can access the link. Must not be null.
      path - Path in user's Dropbox. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getUrl

      @Nonnull public String getUrl()
      URL of the shared link.
      Overrides:
      getUrl in class LinkMetadata
      Returns:
      value for this field, never null.
    • getVisibility

      @Nonnull public Visibility getVisibility()
      Who can access the link.
      Overrides:
      getVisibility in class LinkMetadata
      Returns:
      value for this field, never null.
    • getPath

      @Nonnull public String getPath()
      Path in user's Dropbox.
      Returns:
      value for this field, never null.
    • getExpires

      @Nullable public Date getExpires()
      Expiration time, if set. By default the link won't expire.
      Overrides:
      getExpires in class LinkMetadata
      Returns:
      value for this field, or null if not present.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class LinkMetadata
    • 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 LinkMetadata
      Returns:
      Formatted, multiline String representation of this object