类 BundlePermission
- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- org.osgi.framework.BundlePermission
-
- 所有已实现的接口:
java.io.Serializable,java.security.Guard
public final class BundlePermission extends java.security.BasicPermissionA 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. Wildcards may be used.
name ::= <symbolic name> | <symbolic name ending in ".*"> | *
Examples:org.osgi.example.bundle org.osgi.example.* *
BundlePermissionhas four actions:provide,require,host, andfragment. Theprovideaction implies therequireaction.- 从以下版本开始:
- 1.3
- 作者:
- $Id: 5d3a115a2622919f564e2a2f46d70090ad9859cb $
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 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.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object obj)Determines the equality of twoBundlePermissionobjects.java.lang.StringgetActions()Returns the canonical string representation of theBundlePermissionactions.inthashCode()Returns the hash code value for this object.booleanimplies(java.security.Permission p)Determines if the specified permission is implied by this object.java.security.PermissionCollectionnewPermissionCollection()Returns a newPermissionCollectionobject suitable for storingBundlePermissionobjects.
-
-
-
字段详细资料
-
PROVIDE
public static final java.lang.String PROVIDE
The action stringprovide. Theprovideaction implies therequireaction.- 另请参阅:
- 常量字段值
-
REQUIRE
public static final java.lang.String REQUIRE
The action stringrequire. Therequireaction is implied by theprovideaction.- 另请参阅:
- 常量字段值
-
HOST
public static final java.lang.String HOST
The action stringhost.- 另请参阅:
- 常量字段值
-
FRAGMENT
public static final java.lang.String FRAGMENT
The action stringfragment.- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
BundlePermission
public 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.Bundle Permissions are granted over all possible versions of a bundle. A bundle that needs to provide a bundle must have the appropriate
BundlePermissionfor the symbolic name; a bundle that requires a bundle must have the appropriateBundlePermssionfor that symbolic name; a bundle that specifies a fragment host must have the appropriateBundlePermissionfor that symbolic name.- 参数:
symbolicName- The bundle symbolic name.actions-provide,require,host,fragment(canonical order).
-
-
方法详细资料
-
implies
public boolean implies(java.security.Permission p)
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
BundlePermissionactions must either match or allow for the list of the target object to imply the targetBundlePermissionaction.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- 覆盖:
implies在类中java.security.BasicPermission- 参数:
p- The requested permission.- 返回:
trueif the specifiedBundlePermissionaction is implied by this object;falseotherwise.
-
getActions
public java.lang.String getActions()
Returns the canonical string representation of theBundlePermissionactions.Always returns present
BundlePermissionactions in the following order:provide,require,host,fragment.- 覆盖:
getActions在类中java.security.BasicPermission- 返回:
- Canonical string representation of the
BundlePermissionactions.
-
newPermissionCollection
public java.security.PermissionCollection newPermissionCollection()
Returns a newPermissionCollectionobject suitable for storingBundlePermissionobjects.- 覆盖:
newPermissionCollection在类中java.security.BasicPermission- 返回:
- A new
PermissionCollectionobject.
-
equals
public boolean equals(java.lang.Object obj)
Determines the equality of twoBundlePermissionobjects. This method checks that specified bundle has the same bundle symbolic name andBundlePermissionactions as thisBundlePermissionobject.- 覆盖:
equals在类中java.security.BasicPermission- 参数:
obj- The object to test for equality with thisBundlePermissionobject.- 返回:
trueifobjis aBundlePermission, and has the same bundle symbolic name and actions as thisBundlePermissionobject;falseotherwise.
-
hashCode
public int hashCode()
Returns the hash code value for this object.- 覆盖:
hashCode在类中java.security.BasicPermission- 返回:
- A hash code value for this object.
-
-