Package org.osgi.service.useradmin
Class UserAdminPermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.service.useradmin.UserAdminPermissionCollection
- All Implemented Interfaces:
Serializable
A
UserAdminPermissionCollection stores a set of
UserAdminPermission permissions.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanBoolean saying if "*" is in the collection.private final Hashtable<String, UserAdminPermission> Table of permissions.(package private) static final long -
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyUserAdminPermissionCollectionobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Permission permission) Adds the given permission to thisUserAdminPermissionCollection.elements()Returns an enumeration of all theUserAdminPermissionobjects in the container.booleanimplies(Permission permission) Checks to see if thisPermissionCollectionimplies the given permission.Methods inherited from class java.security.PermissionCollection
elementsAsStream, isReadOnly, setReadOnly, toString
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
permissions
Table of permissions. -
all_allowed
private boolean all_allowedBoolean saying if "*" is in the collection.
-
-
Constructor Details
-
UserAdminPermissionCollection
public UserAdminPermissionCollection()Creates an emptyUserAdminPermissionCollectionobject.
-
-
Method Details
-
add
Adds the given permission to thisUserAdminPermissionCollection. The key for the hash is the name.- Specified by:
addin classPermissionCollection- Parameters:
permission- thePermissionobject to add.- Throws:
IllegalArgumentException- If the given permission is not aUserAdminPermissionSecurityException- If thisUserAdminPermissionCollectionobject has been marked readonly
-
implies
Checks to see if thisPermissionCollectionimplies the given permission.- Specified by:
impliesin classPermissionCollection- Parameters:
permission- thePermissionobject to check against- Returns:
- true if the given permission is implied by this
PermissionCollection, false otherwise.
-
elements
Returns an enumeration of all theUserAdminPermissionobjects in the container.- Specified by:
elementsin classPermissionCollection- Returns:
- an enumeration of all the
UserAdminPermissionobjects.
-