public final class IxcPermission extends Permission
The name specification is the name passed into the IxcRegistry methods such as bind() and lookup(). The names are simple strings; this specification does not impose any special meaning on these strings, such as name canonicalization. Limited wildcarding is allowed at the end of a name string. The name string of length one "*" will match any name. At the end of a string, the special sequence "/*" will match forward-slash followed by any other characters. Otherwise, all characters are simply matched. For example:
The actions to be granted are passed to the constructor in a string containing a list of one or more comma-seperated keywords. The possible keywords are "bind" and "lookup". See the methods on IxcRegistry for a detailed explanation of the meaning of these.
The actions string is converted to lowercase before processing.
IxcRegsitry| Constructor and Description |
|---|
IxcPermission(String name,
String actions)
Creates a new IxcPermission object with the specified name and actions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Checks two IxcPermission 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 IxcPermission "implies" the specified permission.
|
PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing
IxcPermission objects.
|
checkGuard, getName, toStringpublic IxcPermission(String name, String actions)
The actions to be granted are passed to the constructor in a string containing a list of one or more comma-seperated keywords. The possible keywords are "bind" and "lookup". See the methods on IxcRegistry for a detailed explanation of the meaning of these.
The actions string is converted to lowercase before processing.
name - The name specification for exported/imported objectsactions - The action stringpublic boolean implies(Permission p)
More specifically, this method returns true if:
implies in class Permissionp - the permission to check againstpublic boolean equals(Object other)
equals in class Permissionother - the object we are testing for equality with this objectpublic int hashCode()
hashCode in class Permissionpublic String getActions()
getActions in class Permissionpublic PermissionCollection newPermissionCollection()
IxcPermission 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.
For example, if you have two IxcPermission objects:
"/1234/*", "lookup"
"/1234/5678/*", "bind"
and you are calling the implies method with the
IxcPermission:
"/1234/5678/foo",
"bind,lookup",
then the implies method must take into account both the
"/1234/*" and "/1234/5678/*" permissions, so the effective permission
is "bind,lookup" and implies returns true. The
"implies" semantics for IxcPermissions are handled properly by the
permission collection object returned by this
newPermissionCollection method.
newPermissionCollection in class PermissionCopyright © 2012 code4tv.com. All Rights Reserved.