public class FolderPermission
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected FolderAction |
action |
protected boolean |
allow |
protected PermissionDeniedReason |
reason |
Constructor and 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.
|
Modifier and Type | Method and 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.
|
protected final FolderAction action
protected final boolean allow
protected final PermissionDeniedReason reason
public FolderPermission(FolderAction action, boolean allow, PermissionDeniedReason reason)
action
- The action that the user may wish to take on the folder.
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, or if no reason is available.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FolderPermission(FolderAction action, boolean allow)
The default values for unset fields will be used.
action
- The action that the user may wish to take on the folder.
Must not be null
.allow
- True if the user is allowed to take the action.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FolderAction getAction()
null
.public boolean getAllow()
public PermissionDeniedReason getReason()
null
if not present.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.