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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitand, checkPermission, from, from, from, from, not, or, toPermissionCollection, unless, xorprotected AbstractPermission(String name)
name - the permission namepublic final boolean implies(Permission permission)
implies in interface PermissionVerifierimplies in class Permissionpermission - 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 Permissionobj - 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 Permissionpublic String getActions()
getActions in class Permissionnull)public AbstractPermissionCollection newPermissionCollection()
The default implementation returns a SimplePermissionCollection.
newPermissionCollection in class Permissionprotected static void requireEmptyActions(String actions) throws IllegalArgumentException
null; otherwise, throw an exception.actions - the actions stringIllegalArgumentException - if the actions string is not emptyCopyright © 2017 JBoss by Red Hat. All rights reserved.