public abstract class AbstractNamedPermission<This extends AbstractNamedPermission<This>> extends AbstractPermission<This>
Subclasses of this class are always serialized as a special serialized permission object, which captures the type class, the permission name (if any), and the permission action (if any) as a string. Therefore, none of the fields of any subclass of this class are serialized unless they are included in the name or actions properties.
Concrete subclasses are expected to be immutable and final.
ALL, NONE
Modifier | Constructor and Description |
---|---|
protected |
AbstractNamedPermission(String name)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(This other)
Determine whether this permission object is equal to another object of this permission type.
|
int |
hashCode()
Get the hash code of this permission.
|
boolean |
implies(This permission)
Determine whether this permission implies another permission.
|
boolean |
impliesName(Permission permission)
Determine whether this permission implies the name of the given permission.
|
boolean |
impliesName(String name)
Determine whether this permission implies the given name.
|
boolean |
impliesName(This permission)
Determine whether this permission implies the name of the given permission.
|
boolean |
nameEquals(Permission permission)
Determine whether this permission has a name equal to the name of the given permission.
|
boolean |
nameEquals(String name)
Determine whether this permission has a name equal to the given name.
|
boolean |
nameEquals(This permission)
Determine whether this permission has a name equal to the name of the given permission.
|
protected int |
nameHashCode()
Get the hash code of the name.
|
abstract This |
withName(String name)
Create a new permission which is identical to this one, except with a new
name . |
equals, getActions, implies, newPermissionCollection, requireEmptyActions
checkGuard, getName, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, checkPermission, from, from, from, from, not, or, toPermissionCollection, unless, xor
protected AbstractNamedPermission(String name)
name
- the permission name (must not be null
)public abstract This withName(String name)
name
.name
- the name to use (must not be null
)public boolean nameEquals(String name)
name
- the name to checktrue
if this permission's name is equal to the given name, false
otherwisepublic final boolean nameEquals(Permission permission)
false
is returned.permission
- the permission whose name is to be checkedtrue
if this permission's name is equal to the given permission's name, false
otherwisepublic final boolean nameEquals(This permission)
permission
- the permission whose name is to be checkedtrue
if this permission's name is equal to the given permission's name, false
otherwiseprotected int nameHashCode()
getName().hashCode()
.public boolean impliesName(String name)
name
- the name to checktrue
if this permission's name implies the given name, false
otherwisepublic final boolean impliesName(Permission permission)
false
is returned.permission
- the permission whose name is to be checkedtrue
if this permission's name implies the given name, false
otherwisepublic boolean impliesName(This permission)
permission
- the permission whose name is to be checkedtrue
if this permission's name implies the given name, false
otherwisepublic boolean implies(This permission)
AbstractPermission
implies
in class AbstractPermission<This extends AbstractNamedPermission<This>>
permission
- the other permissiontrue
if this permission implies the other; false
otherwisepublic boolean equals(This other)
AbstractPermission
equals
in class AbstractPermission<This extends AbstractNamedPermission<This>>
other
- the permission to compare totrue
if the object is a permission equal to this one; false
otherwisepublic int hashCode()
AbstractPermission
AbstractPermission.equals(AbstractPermission)
result.hashCode
in class AbstractPermission<This extends AbstractNamedPermission<This>>
Copyright © 2020 JBoss by Red Hat. All rights reserved.