|
|||||||||
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.ocap.application.OcapIxcPermission
public final class OcapIxcPermission
This class represents access to the inter-xlet communication registry. An OcapIxcPermission consists of a name specification and a action specifying what can be done with those names.
The name specification is a superset of the name passed into the IxcRegistry
methods such as IxcRegistry.bind(javax.tv.xlet.XletContext, java.lang.String, java.rmi.Remote)
and IxcRegistry.lookup(javax.tv.xlet.XletContext, java.lang.String)
.
Valid names are composed of fields delimited by "/" characters, with each field
specifying a particular value (e.g., OID). The following grammar defines the name
format:
NAME = "*" | "/" SCOPE "/" SIGNED "/" OID "/" AID "/" BINDNAME SCOPE = "*" | "global" | "ixc" | "service-" CONTEXT CONTEXT = "*" | context-id SIGNED = "*" | "signed" | "unsigned" OID = "*" | oid AID = "*" | aid BINDNAME = "*" | bindname | bindname "*"Where
"*"
specifies a wildcard character.
Where context-id is a platform-specific unique identifier for a service
context;
oid and aid are the organization
and
application
identifiers of the binding application as
converted by Integer.toHexString(int)
;
and bindname is the application-defined name given at bind-time.
1a
and AID of 4abc
.
bind
and
lookup
methods of IxcRegistry
.
The actions string is converted to lowercase before processing.
Constructor Summary | |
---|---|
OcapIxcPermission(java.lang.String name,
java.lang.String actions)
Creates a new OcapIxcPermission object with the specified name and actions. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Checks two OcapIxcPermission objects for equality. |
java.lang.String |
getActions()
Returns the "canonical string representation" of the actions. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(java.security.Permission p)
Checks if this OcapIxcPermission "implies" the specified permission. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing OcapIxcPermission objects. |
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 |
Constructor Detail |
---|
public OcapIxcPermission(java.lang.String name, java.lang.String actions)
IxcRegistry
methods such as IxcRegistry.bind(javax.tv.xlet.XletContext, java.lang.String, java.rmi.Remote)
and IxcRegistry.lookup(javax.tv.xlet.XletContext, java.lang.String)
.
See the class description
for the specification of the name string.
The actions specification is comprised of a single action specified by one of two
keywords: "bind" or "lookup". These correspond to the bind
and
lookup
methods of IxcRegistry
.
The actions string is converted to lowercase before processing.
name
- The name specification for exported/imported objectsactions
- The action stringMethod Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.security.BasicPermission
obj
- the object we are testing for equality with this object
public java.lang.String getActions()
getActions
in class java.security.BasicPermission
public int hashCode()
hashCode
in class java.security.BasicPermission
public boolean implies(java.security.Permission p)
More specifically, this method returns true if:
The rules for determining if this object's name implies p's name are as follows:
"*"
and "/*/*/*/*/*"
both imply
all possible names.
"*"
),
then all possible values for that field are implied.
service-*
) then all possible values for that field
starting with the non-wildcard portion are implied.
For example, "/service-*/signed/abc/4001/*"
implies
"/service-1234/signed/abc/4001/VODObject"
.
An OcapIxcPermission
may also imply an IxcPermission
.
That is, this method will also return true if:
The rules for determining if this object's name implies an IxcPermission
name are the same as detailed above except that a translation of the IxcPermission
name to the OcapIxcPermission
is applied first. The following table
shows how such a mapping SHALL be applied:
IxcPermission name | OcapIxcPermission name |
---|---|
"*" | "*" |
"dvb:/*" | "*" |
"dvb:/signed/*" | "/global/signed/*/*/* |
"dvb:/service/id/signed/*" | "/service-id/signed/*/*/* |
"dvb:/ixc/*" | "/ixc/*/*/*/* |
"dvb:/signed/OID/*" | "/global/signed/OID/*/* |
"dvb:/service/id/signed/OID/*" | "/service-id/signed/OID/*/* |
"dvb:/ixc/OID/*" | "/ixc/*/OID/*/* |
"dvb:/signed/OID/AID/*" | "/global/signed/OID/AID/* |
"dvb:/service/id/signed/OID/AID/*" | "/service-id/signed/OID/AID/* |
"dvb:/ixc/OID/AID/*" | "/ixc/*/OID/AID/* |
"dvb:/signed/OID/AID/name*" | "/global/signed/OID/AID/name* |
"dvb:/service/id/signed/OID/AID/name*" | "/service-id/signed/OID/AID/name* |
"dvb:/ixc/OID/AID/name*" | "/ixc/*/OID/AID/name* |
Any IxcPermission
name that cannot be mapped cannot be implied.
implies
in class java.security.BasicPermission
p
- the permission to check against
public java.security.PermissionCollection newPermissionCollection()
OcapIxcPermission objects must be stored in a manner that allows them to be inserted into the collection in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.
newPermissionCollection
in class java.security.BasicPermission
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |