Package org.osgi.service.cm
Class ConfigurationPermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.service.cm.ConfigurationPermissionCollection
- All Implemented Interfaces:
Serializable
Stores a set of
ConfigurationPermission permissions.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanBoolean saying if "*" is in the collection.private Map<String, ConfigurationPermission> Collection of permissions.private static final ObjectStreamField[](package private) static final long -
Constructor Summary
ConstructorsConstructorDescriptionCreates an emptyConfigurationPermissionCollectionobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Permission permission) Adds the specified permission to theConfigurationPermissionCollection.elements()Returns an enumeration of allConfigurationPermissionobjects in the container.booleanimplies(Permission permission) Determines if the specified 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
Collection of permissions. -
all_allowed
private boolean all_allowedBoolean saying if "*" is in the collection. -
serialPersistentFields
-
-
Constructor Details
-
ConfigurationPermissionCollection
public ConfigurationPermissionCollection()Creates an emptyConfigurationPermissionCollectionobject.
-
-
Method Details
-
add
Adds the specified permission to theConfigurationPermissionCollection. The key for the hash is the interface name of the service.- Specified by:
addin classPermissionCollection- Parameters:
permission- ThePermissionobject to add.- Throws:
IllegalArgumentException- If the permission is not anConfigurationPermission.SecurityException- If this ConfigurationPermissionCollection object 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 thisConfigurationPermissionobject.- Returns:
trueifpermissionis a proper subset of a permission in the set;falseotherwise.
-
elements
Returns an enumeration of allConfigurationPermissionobjects in the container.- Specified by:
elementsin classPermissionCollection- Returns:
- Enumeration of all
ConfigurationPermissionobjects.
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOExceptionClassNotFoundException
-