Package com.dropbox.core.v2.sharing
Class FolderPermission
- java.lang.Object
-
- com.dropbox.core.v2.sharing.FolderPermission
-
public class FolderPermission extends java.lang.Object
Whether the user is allowed to take the action on the shared folder.
-
-
Field Summary
Fields Modifier and Type Field Description protected FolderAction
action
protected boolean
allow
protected PermissionDeniedReason
reason
-
Constructor Summary
Constructors Constructor Description FolderPermission(FolderAction action, boolean allow)
Whether the user is allowed to take the action on the shared folder.FolderPermission(FolderAction action, boolean allow, PermissionDeniedReason reason)
Whether the user is allowed to take the action on the shared folder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
FolderAction
getAction()
The action that the user may wish to take on the folder.boolean
getAllow()
True if the user is allowed to take the action.PermissionDeniedReason
getReason()
The reason why the user is denied the permission.int
hashCode()
java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
action
protected final FolderAction action
-
allow
protected final boolean allow
-
reason
protected final PermissionDeniedReason reason
-
-
Constructor Detail
-
FolderPermission
public FolderPermission(FolderAction action, boolean allow, PermissionDeniedReason reason)
Whether the user is allowed to take the action on the shared folder.- Parameters:
action
- The action that the user may wish to take on the folder. Must not benull
.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, or if no reason is available.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
FolderPermission
public FolderPermission(FolderAction action, boolean allow)
Whether the user is allowed to take the action on the shared folder.The default values for unset fields will be used.
- Parameters:
action
- The action that the user may wish to take on the folder. Must not benull
.allow
- True if the user is allowed to take the action.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getAction
public FolderAction getAction()
The action that the user may wish to take on the folder.- 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
public PermissionDeniedReason getReason()
The reason why the user is denied the permission. Not present if the action is allowed, or if no reason is available.- Returns:
- value for this field, or
null
if not present.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.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
-
-