Package org.osgi.framework
Class ServicePermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.framework.ServicePermissionCollection
- All Implemented Interfaces:
Serializable
Stores a set of ServicePermission permissions.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanBoolean saying if "*" is in the collection.private Map<String, ServicePermission> Table of permissions with filter expressions.private Map<String, ServicePermission> Table of permissions.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.private intConsult permissions map to compute the effective permission for the requested permission name.elements()Returns an enumeration of all theServicePermissionobjects in the container.booleanimplies(Permission permission) Determines if a set of permissions implies the permissions expressed inpermission.private voidprivate voidMethods 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. -
filterPermissions
Table of permissions with filter expressions. -
serialPersistentFields
-
-
Constructor Details
-
ServicePermissionCollection
public ServicePermissionCollection()Creates an empty ServicePermissions object.
-
-
Method Details
-
add
Adds a permission to this permission collection.- Specified by:
addin classPermissionCollection- Parameters:
permission- The Permission object to add.- Throws:
IllegalArgumentException- If the specified permission is not a ServicePermission object.SecurityException- If thisServicePermissionCollectionobject has been marked read-only.
-
implies
Determines if a set of permissions implies the permissions expressed inpermission.- Specified by:
impliesin classPermissionCollection- Parameters:
permission- The Permission object to compare.- Returns:
trueifpermissionis a proper subset of a permission in the set;falseotherwise.
-
effective
Consult permissions map to compute the effective permission for the requested permission name.- Parameters:
requestedName- The requested service name.desired- The desired actions.effective- The effective actions.- Returns:
- The new effective actions.
-
elements
Returns an enumeration of all theServicePermissionobjects in the container.- Specified by:
elementsin classPermissionCollection- Returns:
- Enumeration of all the ServicePermission objects.
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOExceptionClassNotFoundException
-