Package org.wildfly.security.permission
Class AbstractNameSetOnlyPermission<This extends AbstractNameSetOnlyPermission<This>>
- java.lang.Object
-
- java.security.Permission
-
- org.wildfly.security.permission.AbstractPermission<This>
-
- org.wildfly.security.permission.AbstractNamedPermission<This>
-
- org.wildfly.security.permission.AbstractNameOnlyPermission<This>
-
- org.wildfly.security.permission.AbstractNameSetOnlyPermission<This>
-
- All Implemented Interfaces:
Serializable
,Guard
,PermissionVerifier
- Direct Known Subclasses:
CredentialStorePermission
,ElytronPermission
,WildFlySecurityManagerPermission
public abstract class AbstractNameSetOnlyPermission<This extends AbstractNameSetOnlyPermission<This>> extends AbstractNameOnlyPermission<This>
An actionless permission with a finite, fixed set of possible names.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNameSetOnlyPermission(String name, org.wildfly.security.util.StringEnumeration nameEnumeration)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
impliesName(String name)
Determine whether this permission implies the given name.boolean
nameEquals(String name)
Determine whether this permission has a name equal to the given name.protected int
nameHashCode()
Get the hash code of the name.AbstractPermissionCollection
newPermissionCollection()
Get an empty permission collection which is capable of holding instances of this permission type.-
Methods inherited from class org.wildfly.security.permission.AbstractNamedPermission
equals, hashCode, implies, impliesName, impliesName, nameEquals, nameEquals, withName
-
Methods inherited from class org.wildfly.security.permission.AbstractPermission
equals, getActions, implies, requireEmptyActions
-
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.permission.PermissionVerifier
and, checkPermission, not, or, toPermissionCollection, unless, xor
-
-
-
-
Constructor Detail
-
AbstractNameSetOnlyPermission
protected AbstractNameSetOnlyPermission(String name, org.wildfly.security.util.StringEnumeration nameEnumeration)
Construct a new instance.- Parameters:
name
- the name of this permissionnameEnumeration
- the set of valid names for this permission type
-
-
Method Detail
-
newPermissionCollection
public AbstractPermissionCollection newPermissionCollection()
Description copied from class:AbstractPermission
Get an empty permission collection which is capable of holding instances of this permission type.The default implementation returns a
SimplePermissionCollection
.- Overrides:
newPermissionCollection
in classAbstractNameOnlyPermission<This extends AbstractNameSetOnlyPermission<This>>
- Returns:
- the permission collection to use
-
nameEquals
public final boolean nameEquals(String name)
Description copied from class:AbstractNamedPermission
Determine whether this permission has a name equal to the given name.- Overrides:
nameEquals
in classAbstractNamedPermission<This extends AbstractNameSetOnlyPermission<This>>
- Parameters:
name
- the name to check- Returns:
true
if this permission's name is equal to the given name,false
otherwise
-
impliesName
public final boolean impliesName(String name)
Description copied from class:AbstractNamedPermission
Determine whether this permission implies the given name.- Overrides:
impliesName
in classAbstractNamedPermission<This extends AbstractNameSetOnlyPermission<This>>
- Parameters:
name
- the name to check- Returns:
true
if this permission's name implies the given name,false
otherwise
-
nameHashCode
protected final int nameHashCode()
Description copied from class:AbstractNamedPermission
Get the hash code of the name. The default implementation returnsgetName().hashCode()
.- Overrides:
nameHashCode
in classAbstractNamedPermission<This extends AbstractNameSetOnlyPermission<This>>
- Returns:
- the hash code of the name
-
-