public class DeploymentCustomizerPermission
extends java.security.Permission
DeploymentCustomizerPermission permission gives the right to
Resource Processors to access a bundle's (residing in a Deployment Package) private area.
The bundle and the Resource Processor (customizer) have to be in the same Deployment Package.
The Resource Processor that has this permission is allowed to access the bundle's
private area by calling the DeploymentSession.getDataFile(org.osgi.framework.Bundle) method during the session
(see DeploymentSession). After the session ends the FilePermissions are withdrawn.
The Resource Processor will have FilePermission with "read", "write" and "delete"
actions for the returned File that represents the the base directory of the
persistent storage area and for its subdirectories.
The actions string is converted to lowercase before processing.
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.reflect.Constructor |
constructor |
private java.security.Permission |
delegate |
private static java.lang.String |
delegateProperty |
static java.lang.String |
PRIVATEAREA
Constant String to the "privatearea" action.
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
DeploymentCustomizerPermission(java.lang.String name,
java.lang.String actions)
Creates a new
DeploymentCustomizerPermission object for the given
name and action. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Checks two DeploymentCustomizerPermission objects for equality.
|
java.lang.String |
getActions()
Returns the String representation of the action list.
|
int |
hashCode()
Returns hash code for this permission object.
|
boolean |
implies(java.security.Permission permission)
Checks if this DeploymentCustomizerPermission would imply the parameter permission.
|
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing DeploymentCustomizerPermission
objects.
|
private static final long serialVersionUID
public static final java.lang.String PRIVATEAREA
private static final java.lang.String delegateProperty
private static final java.lang.reflect.Constructor constructor
private final java.security.Permission delegate
public DeploymentCustomizerPermission(java.lang.String name,
java.lang.String actions)
DeploymentCustomizerPermission object for the given
name and action.The name parameter is a filter string. This filter has the same syntax as an OSGi filter but only the "name" attribute is allowed. The value of the attribute is a Bundle Symbolic Name that represents a bundle. The only allowed action is the "privatearea" action. E.g.
Permission perm = new DeploymentCustomizerPermission("(name=com.acme.bundle)", "privatearea");
The Resource Processor that has this permission is allowed to access the bundle's
private area by calling the DeploymentSession.getDataFile(org.osgi.framework.Bundle) method. The
Resource Processor will have FilePermission with "read", "write" and "delete"
actions for the returned File and its subdirectories during the deployment
session.name - Bundle Symbolic Name of the target bundle, must not be null.actions - action string (only the "privatearea" or "*" action is valid; "*" means all
the possible actions), must not be null.java.lang.IllegalArgumentException - if the filter is invalid, the list of actions
contains unknown operations or one of the parameters is nullpublic boolean equals(java.lang.Object obj)
equals in class java.security.Permissionobj - the reference object with which to compare.Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.security.PermissionObject.hashCode()public java.lang.String getActions()
getActions in class java.security.PermissionPermission.getActions()public boolean implies(java.security.Permission permission)
DeploymentAdminPermission.implies in class java.security.Permissionpermission - Permission to check.Permission.implies(java.security.Permission)public java.security.PermissionCollection newPermissionCollection()
newPermissionCollection in class java.security.PermissionPermission.newPermissionCollection()