Package org.osgi.framework
Class BundlePermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.framework.BundlePermissionCollection
- All Implemented Interfaces:
Serializable
Stores a set of
BundlePermission
permissions.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Boolean saying if "*" is in the collection.private Map<String,
BundlePermission> Table of permissions.private static final ObjectStreamField[]
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Permission permission) Add a permission to this permission collection.elements()
Returns an enumeration of allBundlePermission
objects in the container.boolean
implies
(Permission permission) Determines if the specified permissions implies the permissions expressed inpermission
.private void
private void
Methods inherited from class java.security.PermissionCollection
elementsAsStream, isReadOnly, setReadOnly, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
permissions
Table of permissions. -
all_allowed
private boolean all_allowedBoolean saying if "*" is in the collection. -
serialPersistentFields
-
-
Constructor Details
-
BundlePermissionCollection
public BundlePermissionCollection()Create an empty BundlePermissions object.
-
-
Method Details
-
add
Add a permission to this permission collection.- Specified by:
add
in classPermissionCollection
- Parameters:
permission
- TheBundlePermission
object to add.- Throws:
IllegalArgumentException
- If the permission is not aBundlePermission
instance.SecurityException
- If thisBundlePermissionCollection
object has been marked read-only.
-
implies
Determines if the specified permissions implies the permissions expressed inpermission
.- Specified by:
implies
in classPermissionCollection
- Parameters:
permission
- The Permission object to compare with thisBundlePermission
object.- Returns:
true
ifpermission
is a proper subset of a permission in the set;false
otherwise.
-
elements
Returns an enumeration of allBundlePermission
objects in the container.- Specified by:
elements
in classPermissionCollection
- Returns:
- Enumeration of all
BundlePermission
objects.
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
ClassNotFoundException
-