Class PackagePermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.framework.PackagePermissionCollection
- All Implemented Interfaces:
Serializable
Stores a set of
PackagePermission permissions.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanBoolean saying if "*" is in the collection.private Map<String, PackagePermission> Table of permissions with filter expressions.private Map<String, PackagePermission> Table of permissions with names.private static final ObjectStreamField[](package private) static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Permission permission) Adds a permission to this permission collection.elements()Returns an enumeration of allPackagePermissionobjects in the container.booleanimplies(Permission permission) Determines if the specified permissions implies the permissions expressed inpermission.private voidprivate voidMethods inherited from class PermissionCollection
isReadOnly, setReadOnly, toString
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
permissions
Table of permissions with names. -
all_allowed
private boolean all_allowedBoolean saying if "*" is in the collection. -
filterPermissions
Table of permissions with filter expressions. -
serialPersistentFields
-
-
Constructor Details
-
PackagePermissionCollection
public PackagePermissionCollection()Create an empty PackagePermissions object.
-
-
Method Details
-
add
Adds a permission to this permission collection.- Specified by:
addin classPermissionCollection- Parameters:
permission- ThePackagePermissionobject to add.- Throws:
IllegalArgumentException- If the specified permission is not aPackagePermissioninstance or was constructed with a Bundle object.SecurityException- If thisPackagePermissionCollectionobject has been marked read-only.
-
implies
Determines if the specified permissions implies the permissions expressed inpermission.- Specified by:
impliesin classPermissionCollection- Parameters:
permission- The Permission object to compare with thisPackagePermissionobject.- Returns:
trueifpermissionis a proper subset of a permission in the set;falseotherwise.
-
elements
Returns an enumeration of allPackagePermissionobjects in the container.- Specified by:
elementsin classPermissionCollection- Returns:
- Enumeration of all
PackagePermissionobjects.
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOExceptionClassNotFoundException
-