|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.osgi.service.permissionadmin.PermissionInfo
Permission representation used by the Permission Admin service.
This class encapsulates three pieces of information: a Permission type (class name), which must be a subclass of java.security.Permission, and the name and actions arguments passed to its constructor.
In order for a permission represented by a PermissionInfo to be instantiated and considered during a permission check, its Permission class must be available from the system classpath or an exported package. This means that the instantiation of a permission represented by a PermissionInfo may be delayed until its Permission class has been exported to the Framework.
Constructor Summary | |
PermissionInfo(java.lang.String encodedPermission)
Constructs a PermissionInfo object from the given encoded PermissionInfo string. |
|
PermissionInfo(java.lang.String type,
java.lang.String name,
java.lang.String actions)
Constructs a PermissionInfo from the given type, name, and actions. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines the equality of two PermissionInfo objects. |
java.lang.String |
getActions()
Returns the actions of the permission represented by this PermissionInfo. |
java.lang.String |
getEncoded()
Returns the string encoding of this PermissionInfo in a form suitable for restoring this PermissionInfo. |
java.lang.String |
getName()
Returns the name of the permission represented by this PermissionInfo. |
java.lang.String |
getType()
Returns the fully qualified class name of the permission represented by this PermissionInfo. |
int |
hashCode()
Returns the hash code value for this object. |
java.lang.String |
toString()
Returns the string representation of this PermissionInfo. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PermissionInfo(java.lang.String type, java.lang.String name, java.lang.String actions)
type
- The fully qualified class name of the permission
represented by this PermissionInfo. The class must be a subclass of
java.security.Permission and
must define a 2-argument constructor that takes a name string
and an actions string.name
- The permission name that will be passed as the first
argument to the constructor of the Permission class identified by
type.actions
- The permission actions
that will be passed as the second
argument to the constructor of the Permission class identified by
type.public PermissionInfo(java.lang.String encodedPermission)
encodedPermission
- The encoded PermissionInfo.
java.lang.IllegalArgumentException
- if encodedPermission is
not properly formatted.getEncoded()
Method Detail |
public final java.lang.String getEncoded()
The encoding format is:
(type)or
(type "name")or
(type "name" "actions")where name and actions are strings that are encoded for proper parsing. Specifically, the ", \, carriage return, and linefeed characters are escaped using \", \\, \r, and \n, respectively.
public java.lang.String toString()
public final java.lang.String getType()
public final java.lang.String getName()
public final java.lang.String getActions()
public boolean equals(java.lang.Object obj)
obj
- The object to test for equality with this
PermissionInfo object.
public int hashCode()
|
OSGi™ Service Platform Release 2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |