public abstract class AbstractPermission<This extends AbstractPermission<This>> extends Permission implements PermissionVerifier
ALL, NONE
Modifier | Constructor and Description |
---|---|
protected |
AbstractPermission(String name)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determine whether this permission object is equal to another object.
|
abstract boolean |
equals(This other)
Determine whether this permission object is equal to another object of this permission type.
|
String |
getActions()
Get the actions string.
|
abstract int |
hashCode()
Get the hash code of this permission.
|
boolean |
implies(Permission permission)
Determine whether this permission implies another permission.
|
abstract boolean |
implies(This permission)
Determine whether this permission implies another permission.
|
AbstractPermissionCollection |
newPermissionCollection()
Get an empty permission collection which is capable of holding instances of this permission type.
|
protected static void |
requireEmptyActions(String actions)
Check to ensure that the given action string is empty or
null ; otherwise, throw an exception. |
checkGuard, getName, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, checkPermission, from, from, from, from, not, or, toPermissionCollection, unless, xor
protected AbstractPermission(String name)
name
- the permission namepublic final boolean implies(Permission permission)
implies
in interface PermissionVerifier
implies
in class Permission
permission
- the other permissiontrue
if this permission implies the other; false
otherwisepublic abstract boolean implies(This permission)
permission
- the other permissiontrue
if this permission implies the other; false
otherwisepublic final boolean equals(Object obj)
equals
in class Permission
obj
- the object to compare totrue
if the object is a permission equal to this one; false
otherwisepublic abstract boolean equals(This other)
other
- the permission to compare totrue
if the object is a permission equal to this one; false
otherwisepublic abstract int hashCode()
equals(AbstractPermission)
result.hashCode
in class Permission
public String getActions()
getActions
in class Permission
null
)public AbstractPermissionCollection newPermissionCollection()
The default implementation returns a SimplePermissionCollection
.
newPermissionCollection
in class Permission
protected static void requireEmptyActions(String actions) throws IllegalArgumentException
null
; otherwise, throw an exception.actions
- the actions stringIllegalArgumentException
- if the actions string is not emptyCopyright © 2020 JBoss by Red Hat. All rights reserved.