|
||||||||||
| 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(String name,
String actions)
Creates a new OcapIxcPermission object with the specified name and actions. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Checks two OcapIxcPermission objects for equality. |
String |
getActions()
Returns the "canonical string representation" of the actions. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(Permission p)
Checks if this OcapIxcPermission "implies" the specified permission. |
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(String name,
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 string| Method Detail |
|---|
public boolean equals(Object obj)
equals in class BasicPermissionobj - the object we are testing for equality with this object
Object.hashCode(),
Hashtablepublic String getActions()
getActions in class BasicPermissionpublic int hashCode()
hashCode in class BasicPermissionObject.equals(java.lang.Object),
Hashtablepublic boolean implies(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 BasicPermissionp - the permission to check against
public 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 BasicPermission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||