| java.lang.Object java.security.Permission javax.microedition.media.PlayerPermission
Constructor Summary | |
public | PlayerPermission(String name, String actions) Creates a new PlayerPermission object with the specified name
and actions. |
Method Summary | |
public boolean | equals(Object obj) Checks two PlayerPermission objects for equality. | public String | getActions() Returns the "canonical string representation" of the actions.
That is, this method always returns present actions in the following order:
record, snapshot. | public int | hashCode() Returns the hash code value for this object. | public boolean | implies(Permission p) Checks if this PlayerPermission object "implies" the specified
permission.
More specifically, this method returns true if:
- p is an instanceof PlayerPermission,
- p's actions are a subset of this object's actions.
- p's name is implied by this object's name:
- if this object's name does not end in "*" and
this object's name is equal to p's name.
- if this object's name ends in "*" and
this object's name, without the final "*",
is a prefix of p's name.
For example, "*" implies any other locator,
"capture:*" implies "capture://audio".
Parameters: p - the permission to check against. |
PlayerPermission | public PlayerPermission(String name, String actions)(Code) | | Creates a new PlayerPermission object with the specified name
and actions. name is the locator to which the permissions apply.
actions contains a comma-separated list of the
desired actions granted on the property. Possible actions are
"record" and "snapshot".
Parameters: name - the locator to which the permission applies. Parameters: actions - the actions string. throws: NullPointerException - if name or actions is null . throws: IllegalArgumentException - if action is invalid orif name is zero length. |
equals | public boolean equals(Object obj)(Code) | | Checks two PlayerPermission objects for equality. Checks that obj is
a PlayerPermission, and has the same name and actions as this object.
Parameters: obj - the object we are testing for equality with this object. true if obj is a PlayerPermission, and has the same name andactions as this PlayerPermission object. |
getActions | public String getActions()(Code) | | Returns the "canonical string representation" of the actions.
That is, this method always returns present actions in the following order:
record, snapshot. For example, if this PlayerPermission object
allows both record and snapshot actions, a call to getActions
will return the string "record,snapshot".
the canonical string representation of the actions. |
hashCode | public int hashCode()(Code) | | Returns the hash code value for this object.
The value returned complies with the requirements of the
the hashCode method of the superclass.
a hash code value for this object. |
implies | public boolean implies(Permission p)(Code) | | Checks if this PlayerPermission object "implies" the specified
permission.
More specifically, this method returns true if:
- p is an instanceof PlayerPermission,
- p's actions are a subset of this object's actions.
- p's name is implied by this object's name:
- if this object's name does not end in "*" and
this object's name is equal to p's name.
- if this object's name ends in "*" and
this object's name, without the final "*",
is a prefix of p's name.
For example, "*" implies any other locator,
"capture:*" implies "capture://audio".
Parameters: p - the permission to check against. true if the specified permission is implied by this object,false if not. |
|
|