public class LinkPermission
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LinkAction |
action |
protected boolean |
allow |
protected PermissionDeniedReason |
reason |
Constructor and Description |
---|
LinkPermission(LinkAction action,
boolean allow)
Permissions for actions that can be performed on a link.
|
LinkPermission(LinkAction action,
boolean allow,
PermissionDeniedReason reason)
Permissions for actions that can be performed on a link.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
LinkAction |
getAction() |
boolean |
getAllow() |
PermissionDeniedReason |
getReason() |
int |
hashCode() |
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final LinkAction action
protected final boolean allow
protected final PermissionDeniedReason reason
public LinkPermission(LinkAction action, boolean allow, PermissionDeniedReason reason)
action
- Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public LinkPermission(LinkAction action, boolean allow)
The default values for unset fields will be used.
action
- Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public LinkAction 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.