Package org.wildfly.security.permission
Class NameSetPermissionCollection
- java.lang.Object
-
- java.security.PermissionCollection
-
- org.wildfly.security.permission.AbstractPermissionCollection
-
- org.wildfly.security.permission.NameSetPermissionCollection
-
- All Implemented Interfaces:
Serializable
,Iterable<Permission>
,PermissionVerifier
- Direct Known Subclasses:
IntNameSetPermissionCollection
,LongNameSetPermissionCollection
public abstract class NameSetPermissionCollection extends AbstractPermissionCollection
A permission collection for permissions with a finite set of names, which is based on a simple bit set. In this type of collection, each bit represents a unique permission of a given name. This type is not suitable for permissions with actions.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private StringEnumeration
nameEnumeration
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.permission.PermissionVerifier
ALL, NONE
-
-
Constructor Summary
Constructors Constructor Description NameSetPermissionCollection(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) StringEnumeration
getNameEnumeration()
static AbstractPermissionCollection
newInstance(AbstractNameSetOnlyPermission<?> sourcePermission)
Construct a new instance.static AbstractPermissionCollection
newInstance(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
Construct a new instance.-
Methods inherited from class org.wildfly.security.permission.AbstractPermissionCollection
add, doAdd, elements, getSourcePermission, iterator, size, writeReplace
-
Methods inherited from class java.security.PermissionCollection
elementsAsStream, implies, isReadOnly, setReadOnly, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.wildfly.security.permission.PermissionVerifier
and, checkPermission, implies, not, or, toPermissionCollection, unless, xor
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
nameEnumeration
private final StringEnumeration nameEnumeration
-
-
Constructor Detail
-
NameSetPermissionCollection
NameSetPermissionCollection(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
-
-
Method Detail
-
newInstance
public static AbstractPermissionCollection newInstance(AbstractNameSetOnlyPermission<?> sourcePermission)
Construct a new instance. The name enumeration is pulled from the source permission object.- Parameters:
sourcePermission
- the source permission object (must not benull
)- Returns:
- the permission collection
-
newInstance
public static AbstractPermissionCollection newInstance(AbstractPermission<?> sourcePermission, StringEnumeration nameEnumeration)
Construct a new instance.- Parameters:
sourcePermission
- the source permission object (must not benull
)nameEnumeration
- the name enumeration for this permission type (must not benull
)- Returns:
- the permission collection
-
getNameEnumeration
StringEnumeration getNameEnumeration()
-
-