Top Description Fields Constructors Methods
org.osgi.framework

pack-priv final Class ServicePermissionCollection

Located in compilation unit of org.osgi.framework.ServicePermission.

extends PermissionCollection
Class Inheritance

Stores a set of ServicePermission permissions.
See Also
java.security.Permission, java.security.Permissions, java.security.PermissionCollection

Field Summary

Modifier and TypeField and Description
private boolean
all_allowed

Boolean saying if "*" is in the collection.

private Map<String, ServicePermission>
filterPermissions

Table of permissions with filter expressions.

private transient Map<String, ServicePermission>
permissions

Table of permissions.

private static final ObjectStreamField[]
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
ServicePermissionCollection()

Creates an empty ServicePermissions object.

Method Summary

Modifier and TypeMethod and Description
public void
add(final Permission
The Permission object to add.
permission
)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to this permission collection.

private int

Returns:

The new effective actions.
effective
(String
The requested service name.
requestedName
,
final int
The desired actions.
desired
,
int
The effective actions.
effective
)

Consult permissions map to compute the effective permission for the requested permission name.

public synchronized Enumeration<Permission>

Returns:

Enumeration of all the ServicePermission objects.
elements
()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the ServicePermission objects in the container.

public boolean

Returns:

true if permission is a proper subset of a permission in the set; false otherwise.
implies
(final Permission
The Permission object to compare.
permission
)

Implements abstract java.security.PermissionCollection.implies.

Determines if a set of permissions implies the permissions expressed in permission.

private synchronized void
private synchronized void
Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

all_allowedback to summary
private boolean all_allowed

Boolean saying if "*" is in the collection.

filterPermissionsback to summary
private Map<String, ServicePermission> filterPermissions

Table of permissions with filter expressions.

permissionsback to summary
private transient Map<String, ServicePermission> permissions

Table of permissions.

serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

Constructor Detail

ServicePermissionCollectionback to summary
public ServicePermissionCollection()

Creates an empty ServicePermissions object.

Method Detail

addback to summary
public void add(final Permission permission)

Implements abstract java.security.PermissionCollection.add.

Adds a permission to this permission collection.

Parameters
permission:Permission

The Permission object to add.

Annotations
@Override
Exceptions
IllegalArgumentException:
If the specified permission is not a ServicePermission object.
SecurityException:
If this ServicePermissionCollection object has been marked read-only.
effectiveback to summary
private int effective(String requestedName, final int desired, int effective)

Consult permissions map to compute the effective permission for the requested permission name.

Parameters
requestedName:String

The requested service name.

desired:int

The desired actions.

effective:int

The effective actions.

Returns:int

The new effective actions.

elementsback to summary
public synchronized Enumeration<Permission> elements()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the ServicePermission objects in the container.

Returns:Enumeration<Permission>

Enumeration of all the ServicePermission objects.

Annotations
@Override
impliesback to summary
public boolean implies(final Permission permission)

Implements abstract java.security.PermissionCollection.implies.

Determines if a set of permissions implies the permissions expressed in permission.

Parameters
permission:Permission

The Permission object to compare.

Returns:boolean

true if permission is a proper subset of a permission in the set; false otherwise.

Annotations
@Override
readObjectback to summary
private synchronized void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
writeObjectback to summary
private synchronized void writeObject(ObjectOutputStream out) throws IOException