Class FilePermission

java.lang.Object
com.dropbox.core.v2.sharing.FilePermission

public class FilePermission extends Object
Whether the user is allowed to take the sharing action on the file.
  • Field Details

  • Constructor Details

    • FilePermission

      public FilePermission(@Nonnull FileAction action, boolean allow, @Nullable PermissionDeniedReason reason)
      Whether the user is allowed to take the sharing action on the file.
      Parameters:
      action - The action that the user may wish to take on the file. Must not be null.
      allow - True if the user is allowed to take the action.
      reason - The reason why the user is denied the permission. Not present if the action is allowed.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • FilePermission

      public FilePermission(@Nonnull FileAction action, boolean allow)
      Whether the user is allowed to take the sharing action on the file.

      The default values for unset fields will be used.

      Parameters:
      action - The action that the user may wish to take on the file. Must not be null.
      allow - True if the user is allowed to take the action.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getAction

      @Nonnull public FileAction getAction()
      The action that the user may wish to take on the file.
      Returns:
      value for this field, never null.
    • getAllow

      public boolean getAllow()
      True if the user is allowed to take the action.
      Returns:
      value for this field.
    • getReason

      @Nullable public PermissionDeniedReason getReason()
      The reason why the user is denied the permission. Not present if the action is allowed.
      Returns:
      value for this field, or null if not present.
    • hashCode

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

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

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

      public 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