Additional top-level class in compilation unit: BundlePermissionCollection.
A bundle symbolic name defines a unique fully qualified name. Wildcards may be used.
name ::= <symbolic name> | <symbolic name ending in ".*"> | *Examples:
org.osgi.example.bundle org.osgi.example.* *
BundlePermission has four actions: provide, require,
host, and fragment. The provide action implies the
require action.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private transient int | action_mask
The actions mask. |
| pack-priv static final int | |
| private static final int | |
| private static final int | |
| private volatile String | actions
The actions in canonical form. |
| public static final String | FRAGMENT
The action string |
| public static final String | HOST
The action string |
| public static final String | PROVIDE
The action string |
| public static final String | REQUIRE
The action string |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | BundlePermission(String
The bundle symbolic name. symbolicName, String provide,require, host,
fragment (canonical order).Defines the authority to provide and/or require and or specify a host fragment symbolic name within the OSGi environment. |
| pack-priv | BundlePermission(String
the bundle symbolic name symbolicName, int the action mask mask)Package private constructor used by BundlePermissionCollection. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if obj is a BundlePermission, and
has the same bundle symbolic name and actions as this
BundlePermission object; false otherwise.The object to test for equality with this
obj)BundlePermission object.Overrides java. Determines the equality of two |
| public String | Returns: Canonical string representation of theBundlePermission
actions.Overrides java. Returns the canonical string representation of the
|
| pack-priv synchronized int | |
| public int | Returns: A hash code value for this object.Overrides java. Returns the hash code value for this object. |
| public boolean | Returns: true if the specified BundlePermission action is
implied by this object; false otherwise.The requested permission. p)Overrides java. Determines if the specified permission is implied by this object. |
| public PermissionCollection | Returns: A newPermissionCollection object.Overrides java. Returns a new |
| private static int | Returns: action mask.Action string. actions)Parse action string into action mask. |
| private synchronized void | readObject(ObjectInputStream
the s)ObjectInputStream from which data is readHides java. readObject is called to restore the state of the BundlePermission from a stream. |
| private synchronized void | |
| private synchronized void | writeObject(ObjectOutputStream s)
WriteObject is called to save the state of the |
| ACTION_ALL | back to summary |
|---|---|
| private static final int ACTION_ALL | |
| ACTION_FRAGMENT | back to summary |
|---|---|
| private static final int ACTION_FRAGMENT | |
| ACTION_HOST | back to summary |
|---|---|
| private static final int ACTION_HOST | |
| action_mask | back to summary |
|---|---|
| private transient int action_mask The actions mask. | |
| ACTION_NONE | back to summary |
|---|---|
| pack-priv static final int ACTION_NONE | |
| ACTION_PROVIDE | back to summary |
|---|---|
| private static final int ACTION_PROVIDE | |
| ACTION_REQUIRE | back to summary |
|---|---|
| private static final int ACTION_REQUIRE | |
| actions | back to summary |
|---|---|
| private volatile String actions The actions in canonical form. | |
| FRAGMENT | back to summary |
|---|---|
| public static final String FRAGMENT The action string | |
| HOST | back to summary |
|---|---|
| public static final String HOST The action string | |
| PROVIDE | back to summary |
|---|---|
| public static final String PROVIDE The action string | |
| REQUIRE | back to summary |
|---|---|
| public static final String REQUIRE The action string | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| BundlePermission | back to summary |
|---|---|
| public BundlePermission(String symbolicName, String actions) Defines the authority to provide and/or require and or specify a host fragment symbolic name within the OSGi environment.
Bundle Permissions are granted over all possible versions of a bundle.
A bundle that needs to provide a bundle must have the appropriate
| |
| BundlePermission | back to summary |
|---|---|
| pack-priv BundlePermission(String symbolicName, int mask) Package private constructor used by BundlePermissionCollection.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Determines the equality of two | |
| getActions | back to summary |
|---|---|
| public String getActions() Overrides java. Returns the canonical string representation of the
Always returns present | |
| getActionsMask | back to summary |
|---|---|
| pack-priv synchronized int getActionsMask() Returns the current action mask. Used by the BundlePermissionCollection class.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this object.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission p) Overrides java. Determines if the specified permission is implied by this object.
This method checks that the symbolic name of the target is implied by the
symbolic name of this object. The list of 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
| |
| newPermissionCollection | back to summary |
|---|---|
| public PermissionCollection newPermissionCollection() Overrides java. Returns a new
| |
| parseActions | back to summary |
|---|---|
| private static int parseActions(String actions) Parse action string into action mask.
| |
| readObject | back to summary |
|---|---|
| private synchronized void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException Hides java. readObject is called to restore the state of the BundlePermission from a stream.
| |
| setTransients | back to summary |
|---|---|
| private synchronized void setTransients(int mask) Called by constructors and when deserialized. | |
| writeObject | back to summary |
|---|---|
| private synchronized void writeObject(ObjectOutputStream s) throws IOException WriteObject is called to save the state of the | |