public final class SubsystemPermission
extends java.security.BasicPermission
Action Methods context Subsystem.getBundleContext execute Subsystem.start Subsystem.stop lifecycle Subsystem.install Subsystem.uninstall metadata Subsystem.getSubsystemHeaders Subsystem.getLocation
The name of this permission is a filter expression. The filter gives access to the following attributes:
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
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. |
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
.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
.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.BasicPermission
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
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0