|
OSGi Service Platform Release 4 |
||||||||||
| 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.AdminPermission
Indicates the caller's authority to perform specific privileged administrative operations on or to get sensitive information about a bundle. The actions for this permission are:
Action Methods
class Bundle.loadClass
execute Bundle.start
Bundle.stop
StartLevel.setBundleStartLevel
extensionLifecycle BundleContext.installBundle for extension bundles
Bundle.update for extension bundles
Bundle.uninstall for extension bundles
lifecycle BundleContext.installBundle
Bundle.update
Bundle.uninstall
listener BundleContext.addBundleListener for SynchronousBundleListener
BundleContext.removeBundleListener for SynchronousBundleListener
metadata Bundle.getHeaders
Bundle.getLocation
resolve PackageAdmin.refreshPackages
PackageAdmin.resolveBundles
resource Bundle.getResource
Bundle.getResources
Bundle.getEntry
Bundle.getEntryPaths
Bundle.findEntries
Bundle resource/entry URL creation
startlevel StartLevel.setStartLevel
StartLevel.setInitialBundleStartLevel
The special action "*" will represent all actions.
The name of this permission is a filter expression. The filter gives access to the following parameters:
| Field Summary | |
static java.lang.String |
CLASS
The action string class (Value is "class"). |
static java.lang.String |
EXECUTE
The action string execute (Value is "execute"). |
static java.lang.String |
EXTENSIONLIFECYCLE
The action string extensionLifecycle (Value is
"extensionLifecycle"). |
static java.lang.String |
LIFECYCLE
The action string lifecycle (Value is "lifecycle"). |
static java.lang.String |
LISTENER
The action string listener (Value is "listener"). |
static java.lang.String |
METADATA
The action string metadata (Value is "metadata"). |
static java.lang.String |
RESOLVE
The action string resolve (Value is "resolve"). |
static java.lang.String |
RESOURCE
The action string resource (Value is "resource"). |
static java.lang.String |
STARTLEVEL
The action string startlevel (Value is "startlevel"). |
| Constructor Summary | |
AdminPermission()
Creates a new AdminPermission object that matches all
bundles and has all actions. |
|
AdminPermission(Bundle bundle,
java.lang.String actions)
Creates a new AdminPermission object to be used by the
code that must check a Permission object. |
|
AdminPermission(java.lang.String filter,
java.lang.String actions)
Create a new AdminPermission. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines the equality of two AdminPermission objects. |
java.lang.String |
getActions()
Returns the canonical string representation of the AdminPermission 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 AdminPermissions. |
| 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 CLASS
class (Value is "class").
public static final java.lang.String EXECUTE
execute (Value is "execute").
public static final java.lang.String EXTENSIONLIFECYCLE
extensionLifecycle (Value is
"extensionLifecycle").
public static final java.lang.String LIFECYCLE
lifecycle (Value is "lifecycle").
public static final java.lang.String LISTENER
listener (Value is "listener").
public static final java.lang.String METADATA
metadata (Value is "metadata").
public static final java.lang.String RESOLVE
resolve (Value is "resolve").
public static final java.lang.String RESOURCE
resource (Value is "resource").
public static final java.lang.String STARTLEVEL
startlevel (Value is "startlevel").
| Constructor Detail |
public AdminPermission()
AdminPermission object that matches all
bundles and has all actions. Equivalent to AdminPermission("*","*");
public AdminPermission(java.lang.String filter,
java.lang.String actions)
Examples:
(signer=\*,o=ACME,c=US) (&(signer=\*,o=ACME,c=US)(name=com.acme.*)(location=http://www.acme.com/bundles/*)) (id>=1)
When a signer key is used within the filter expression the signer value must escape the special filter chars ('*', '(', ')').
Null arguments are equivalent to "*".
filter - A filter expression that can use signer, location, id, and
name keys. A value of "*" or null matches
all bundle.actions - class, execute,
extensionLifecycle, lifecycle,
listener, metadata,
resolve, resource, or
startlevel. A value of "*" or null
indicates all actions
public AdminPermission(Bundle bundle,
java.lang.String actions)
AdminPermission object to be used by the
code that must check a Permission object.
bundle - A bundleactions - class, execute,
extensionLifecycle, lifecycle,
listener, metadata,
resolve, resource,
startlevel| Method Detail |
public boolean equals(java.lang.Object obj)
AdminPermission objects.
obj - The object being compared for equality with this object.
true if obj is equivalent to this
AdminPermission; false otherwise.public int hashCode()
public java.lang.String getActions()
AdminPermission actions.
Always returns present AdminPermission actions in the
following order: class, execute,
extensionLifecycle, lifecycle,
listener, metadata, resolve,
resource, startlevel.
AdminPermission actions.public boolean implies(java.security.Permission p)
This method returns true if the specified permission is an
AdminPermission AND
Special case: if the specified permission was constructed with "*"
filter, then this method returns true if this object's
filter is "*" and this object's actions include all of the specified
permission's actions
p - The permission to interrogate.
true if the specified permission is implied by
this object; false otherwise.
java.lang.RuntimeException - if specified permission was not constructed with
a bundle or "*"public java.security.PermissionCollection newPermissionCollection()
PermissionCollection object suitable for
storing AdminPermissions.
PermissionCollection object.
|
OSGi Service Platform Release 4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||