Package org.osgi.service.dmt.security
Class DmtPermissionCollection
java.lang.Object
java.security.PermissionCollection
org.osgi.service.dmt.security.DmtPermissionCollection
- All Implemented Interfaces:
Serializable
Represents a homogeneous collection of DmtPermission objects.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Permission permission) Adds a permission to the DmtPermissionCollection.elements()
Returns an enumeration of all the DmtPermission objects in the container.boolean
implies
(Permission permission) Check whether this set of permissions implies the permission specified in the parameter.Methods inherited from class java.security.PermissionCollection
elementsAsStream, isReadOnly, setReadOnly, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
perms
-
-
Constructor Details
-
DmtPermissionCollection
public DmtPermissionCollection()Create an empty DmtPermissionCollection object.
-
-
Method Details
-
add
Adds a permission to the DmtPermissionCollection.- Specified by:
add
in classPermissionCollection
- Parameters:
permission
- the Permission object to add- Throws:
IllegalArgumentException
- if the permission is not a DmtPermissionSecurityException
- if this DmtPermissionCollection object has been marked readonly
-
implies
Check whether this set of permissions implies the permission specified in the parameter.- Specified by:
implies
in classPermissionCollection
- Parameters:
permission
- the Permission object to compare- Returns:
- true if the parameter permission is a proper subset of the permissions in the collection, false otherwise
-
elements
Returns an enumeration of all the DmtPermission objects in the container. The returned value cannot benull
.- Specified by:
elements
in classPermissionCollection
- Returns:
- an enumeration of all the DmtPermission objects
-