|
OSGi™ Enterprise Release 5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission java.security.BasicPermission org.osgi.service.subsystem.SubsystemPermission
public final class SubsystemPermission
A bundle's authority to perform specific privileged administrative operations on or to get sensitive information about a subsystem. The actions for this permission are:
Action Methods context Subsystem.getBundleContext execute Subsystem.start Subsystem.stop lifecycle Subsystem.install Subsystem.uninstall metadata Subsystem.getHeaders Subsystem.getLocation
The name of this permission is a filter expression. The filter gives access to the following attributes:
Field Summary | |
---|---|
static java.lang.String |
CONTEXT
The action string context . |
static java.lang.String |
EXECUTE
The action string execute . |
static java.lang.String |
LIFECYCLE
The action string lifecycle . |
static java.lang.String |
METADATA
The action string metadata . |
Constructor Summary | |
---|---|
SubsystemPermission(java.lang.String filter,
java.lang.String actions)
Create a new SubsystemPermission. |
|
SubsystemPermission(Subsystem subsystem,
java.lang.String actions)
Creates a new requested SubsystemPermission object to be used by
the code that must perform checkPermission . |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Determines the equality of two SubsystemPermission objects. |
java.lang.String |
getActions()
Returns the canonical string representation of the SubsystemPermission 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
SubsystemPermission s. |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXECUTE
execute
.
public static final java.lang.String LIFECYCLE
lifecycle
.
public static final java.lang.String METADATA
metadata
.
public static final java.lang.String CONTEXT
context
.
Constructor Detail |
---|
public SubsystemPermission(java.lang.String filter, java.lang.String actions)
Examples:
(name=com.acme.*)(location=http://www.acme.com/subsystems/*)) (id>=1)
filter
- A filter expression that can use, location, id, and name
keys. Filter attribute names are processed in a case sensitive
manner. A special value of "*"
can be used to match all
subsystems.actions
- execute
, lifecycle
, metadata
, or
context
.
java.lang.IllegalArgumentException
- If the filter has an invalid syntax.public SubsystemPermission(Subsystem subsystem, java.lang.String actions)
SubsystemPermission
object to be used by
the code that must perform checkPermission
.
SubsystemPermission
objects created with this constructor cannot
be added to an SubsystemPermission
permission collection.
subsystem
- A subsystem.actions
- execute
, lifecycle
, metadata
, or
context
.Method Detail |
---|
public boolean implies(java.security.Permission p)
This method returns true
if the specified permission is a
SubsystemPermission 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
implies
in class java.security.BasicPermission
p
- The requested permission.
true
if the specified permission is implied by this
object; false
otherwise.public java.lang.String getActions()
SubsystemPermission
actions.
Always returns present SubsystemPermission
actions in the
following order: execute
, lifecycle
, metadata
,
context
.
getActions
in class java.security.BasicPermission
SubsystemPermission
actions.public java.security.PermissionCollection newPermissionCollection()
PermissionCollection
object suitable for storing
SubsystemPermission
s.
newPermissionCollection
in class java.security.Permission
PermissionCollection
object.public boolean equals(java.lang.Object obj)
SubsystemPermission
objects.
equals
in class java.security.BasicPermission
obj
- The object being compared for equality with this object.
true
if obj
is equivalent to this
SubsystemPermission
; false
otherwise.public int hashCode()
hashCode
in class java.security.BasicPermission
|
OSGi™ Enterprise Release 5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |