Class FileSharingInfo

java.lang.Object
com.dropbox.core.v2.files.SharingInfo
com.dropbox.core.v2.files.FileSharingInfo

public class FileSharingInfo extends SharingInfo
Sharing info for a file which is contained by a shared folder.
  • Field Details

    • parentSharedFolderId

      @Nonnull protected final String parentSharedFolderId
    • modifiedBy

      @Nullable protected final String modifiedBy
  • Constructor Details

    • FileSharingInfo

      public FileSharingInfo(boolean readOnly, @Nonnull String parentSharedFolderId, @Nullable String modifiedBy)
      Sharing info for a file which is contained by a shared folder.
      Parameters:
      readOnly - True if the file or folder is inside a read-only shared folder.
      parentSharedFolderId - ID of shared folder that holds this file. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
      modifiedBy - The last user who modified the file. This field will be null if the user's account has been deleted. Must have length of at least 40 and have length of at most 40.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • FileSharingInfo

      public FileSharingInfo(boolean readOnly, @Nonnull String parentSharedFolderId)
      Sharing info for a file which is contained by a shared folder.

      The default values for unset fields will be used.

      Parameters:
      readOnly - True if the file or folder is inside a read-only shared folder.
      parentSharedFolderId - ID of shared folder that holds this file. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getReadOnly

      public boolean getReadOnly()
      True if the file or folder is inside a read-only shared folder.
      Overrides:
      getReadOnly in class SharingInfo
      Returns:
      value for this field.
    • getParentSharedFolderId

      @Nonnull public String getParentSharedFolderId()
      ID of shared folder that holds this file.
      Returns:
      value for this field, never null.
    • getModifiedBy

      @Nullable public String getModifiedBy()
      The last user who modified the file. This field will be null if the user's account has been deleted.
      Returns:
      value for this field, or null if not present.
    • hashCode

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

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

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