Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.service
Class ReadPermission

java.lang.Object
  extended byjava.security.Permission
      extended byjavax.tv.service.ReadPermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public final class ReadPermission
extends java.security.Permission
implements java.io.Serializable

This class represents permission to read the data referenced by a given Locator.

See Also:
Serialized Form

Constructor Summary
ReadPermission(Locator locator)
          Creates a new ReadPermission object for the specified locator.
ReadPermission(java.lang.String locator, java.lang.String actions)
          Creates a new ReadPermission object for a locator with the given external form.
 
Method Summary
 boolean equals(java.lang.Object other)
          Checks two ReadPermission objects for equality.
 java.lang.String getActions()
          Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a ReadPermission.
 int hashCode()
          Returns the hash code value for this object.
 boolean implies(java.security.Permission p)
          Checks if this ReadPermission object "implies" the specified permission.
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadPermission

public ReadPermission(Locator locator)
Creates a new ReadPermission object for the specified locator.

Parameters:
locator - The locator. Null indicates permission for all locators.

ReadPermission

public ReadPermission(java.lang.String locator,
                      java.lang.String actions)
Creates a new ReadPermission object for a locator with the given external form. The actions string is currently unused and should be null. This constructor exists for use by the Policy object to instantiate new Permission objects.

Parameters:
locator - The external form of the locator. The string "*" indicates all locators.
actions - Should be null.
Method Detail

implies

public boolean implies(java.security.Permission p)
Checks if this ReadPermission object "implies" the specified permission.

More specifically, this method returns true if:

Parameters:
p - The permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(java.lang.Object other)
Checks two ReadPermission objects for equality. Checks that other is a ReadPermission, and has the same locator as this object.

Parameters:
other - the object we are testing for equality with this object.
Returns:
true if other is of type ReadPermission and has the same locator as this ReadPermission object.

hashCode

public int hashCode()
Returns the hash code value for this object.

Returns:
A hash code value for this object.

getActions

public java.lang.String getActions()
Returns the canonical string representation of the actions, which currently is the empty string "", since there are no actions for a ReadPermission.

Returns:
the empty string "".

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.
ing HTML relocated fr