|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.security.Permission
java.security.BasicPermission
org.osgi.framework.BundlePermission
A bundle's authority to require or provide a bundle or to receive or attach fragments.
A bundle symbolic name defines a unique fully qualified name.
For example:
org.osgi.example.bundle
BundlePermission has four actions: PROVIDE,
REQUIRE,HOST, and FRAGMENT.
The PROVIDE action implies the REQUIRE action.
| Field Summary | |
static java.lang.String |
FRAGMENT
The action string fragment. |
static java.lang.String |
HOST
The action string host. |
static java.lang.String |
PROVIDE
The action string provide. |
static java.lang.String |
REQUIRE
The action string require. |
| Constructor Summary | |
BundlePermission(java.lang.String symbolicName,
java.lang.String actions)
Defines the authority to provide and/or require and or specify a host fragment symbolic name within the OSGi environment. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines the equality of two BundlePermission objects. |
java.lang.String |
getActions()
Returns the canonical string representation of the BundlePermission actions. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(java.security.Permission p)
Determines if the specified permission is implied by this object. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object suitable for
storing BundlePermission objects. |
| Methods inherited from class java.security.Permission |
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String PROVIDE
provide.
public static final java.lang.String REQUIRE
require.
public static final java.lang.String HOST
host.
public static final java.lang.String FRAGMENT
fragment.
| Constructor Detail |
public BundlePermission(java.lang.String symbolicName,
java.lang.String actions)
Bundle Permissions are granted over all possible versions of a bundle.
A bundle that needs to provide a bundle must have the appropriate
BundlePermission for the symbolic name; a bundle that
requires a bundle must have the appropriate BundlePermssion
for that symbolic name; a bundle that specifies a fragment host must have
the appropriate BundlePermission for that symbolic name.
symbolicName - the bundle symbolic name.actions - PROVIDE,REQUIRE,
HOST,FRAGMENT (canonical order).| Method Detail |
public boolean implies(java.security.Permission p)
This method checks that the symbolic name of the target is implied by the
symbolic name of this object. The list of BundlePermission
actions must either match or allow for the list of the target object to
imply the target BundlePermission action.
The permission to provide a bundle implies the permission to require the named symbolic name.
x.y.*,"provide" -> x.y.z,"provide" is true
*,"require" -> x.y, "require" is true
*,"provide" -> x.y, "require" is true
x.y,"provide" -> x.y.z, "provide" is false
p - The target permission to interrogate.
true if the specified
BundlePermission action is implied by this object;
false otherwise.public java.lang.String getActions()
BundlePermission actions.
Always returns present
BundlePermission actions in the
following order: PROVIDE,REQUIRE,
HOST,FRAGMENT.
BundlePermission actions.
public java.security.PermissionCollection newPermissionCollection()
PermissionCollection object suitable for
storing BundlePermission objects.
PermissionCollection object.public boolean equals(java.lang.Object obj)
BundlePermission objects.
This method checks that specified bundle has the same bundle symbolic
name and BundlePermission actions as this
BundlePermission object.
obj - The object to test for equality with this
BundlePermission object.
true if obj is a
BundlePermission, and has the same bundle
symbolic name and actions as this BundlePermission
object; false otherwise.public int hashCode()
|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||