|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission java.security.BasicPermission com.sun.dtv.platform.UserPropertyPermission
public final class UserPropertyPermission
This class describes permission for user properties. It leans on exactly
the same behavior described for PropertyPermission
but applies
to user properties as defined in User
.
The name is that of the user property (e.g.
"com.sun.dtv.user.name
",
"com.sun.dtv.rating.parental
", etc). The naming convention
follows the hierarchical property naming convention also described in
User
. Also, an asterisk may
appear at the end of the name, following a ".
", or by itself,
to signify a wildcard match. For example "com.sun.dtv.*
" or
"*
" is valid, "*sun
" or "com*user
" is
not valid.
The actions to be granted are passed to the constructor in a string
containing a list of zero or more comma-separated keywords. The possible
keywords are "read
" and "write
". Their meaning
is defined as follows:
read
User.getProperties()
and User.getProperty()
to be called.write
User.setProperties()
,
User.setProperty()
and
User.removeProperties()
to be called.
PropertyPermission
,
BasicPermission
,
Permission
,
User
,
Serialized FormConstructor Summary | |
---|---|
UserPropertyPermission(String name,
String actions)
Creates a new UserPropertyPermission object with the
specified name and actions. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Checks two UserPropertyPermission 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 UserPropertyPermission object "implies" the
specified permission. |
PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing
UserPropertyPermission 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 UserPropertyPermission(String name, String actions)
UserPropertyPermission
object with the
specified name and actions. The name
is the name of the
property, and action
contains a comma-separated list
of the desired actions granted on the property. Possible actions are
read
and write
.
name
- The name of the UserPropertyPermission
.actions
- The actions string.Method Detail |
---|
public boolean implies(Permission p)
UserPropertyPermission
object "implies" the
specified permission.
More specifically, this method returns true if:
p
is an instance of
UserPropertyPermission
,p
's actions are a proper subset of this object's
actions, andp
's name is implied by this object's name.
For example, "com.sun.dtv.user.*
" implies
"com.sun.dtv.user.name
".
implies
in class BasicPermission
p
- The permission to check against.
true
if the specified permission is implied by this
object, false
if not.public boolean equals(Object obj)
UserPropertyPermission
objects for equality.
Checks that obj
is a UserPropertyPermission
,
and has the same name and actions as this object.
equals
in class BasicPermission
obj
- The object we are testing for equality with this object.
true
if obj
is a
UserPropertyPermission
, and has the same name and
actions as this UserPropertyPermission
object.public int hashCode()
getName().hashCode()
, where getName
is from
the Permission
superclass.
hashCode
in class BasicPermission
public String getActions()
read
, write
.
For example, if this UserPropertyPermission
object allows
both write
and read
actions, a call to
getActions
will return the string
"read,write
".
getActions
in class BasicPermission
public PermissionCollection newPermissionCollection()
PermissionCollection
object for storing
UserPropertyPermission
objects.
newPermissionCollection
in class BasicPermission
PermissionCollection
object suitable for
storing UserPropertyPermission
s.
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |