javax.tv.media
Class MediaSelectPermission

java.lang.Object
  extended by java.security.Permission
      extended by javax.tv.media.MediaSelectPermission
All Implemented Interfaces:
Serializable, Guard

public final class MediaSelectPermission
extends Permission
implements Serializable

This class represents permission to select, via a MediaSelectControl, the content that a JMF Player presents. A caller might have permission to select content referenced by some locators, but not others.

Version:
1.8, 08/06/00
See Also:
Serialized Form

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

Constructor Detail

MediaSelectPermission

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

Parameters:
locator - The locator for which to create the permission. A value of null indicates permission for all locators.

MediaSelectPermission

public MediaSelectPermission(String locator,
                             String actions)
Creates a new MediaSelectPermission object for a Locator with the given external form. The actions string is currently unused and should be null. This constructor is used by the Policy class 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(Permission p)
Checks if this MediaSelectPermission "implies" the specified Permission.

More specificially, this method returns true if:

Specified by:
implies in class Permission
Parameters:
p - The Permission to check against.
Returns:
true if the specified Permission is implied by this object; false otherwise.

equals

public boolean equals(Object other)
Tests two MediaSelectPermission objects for equality. This method tests that other is of type MediaSelectPermission, and has the same Locator as this object.

Specified by:
equals in class Permission
Parameters:
other - The object to test for equality.
Returns:
true if other is a MediaSelectPermission, and has the same Locator as this MediaSelectPermission.
See Also:
Object.hashCode(), Hashtable

hashCode

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

Specified by:
hashCode in class Permission
Returns:
The hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

getActions

public String getActions()
Reports the canonical string representation of the actions. This is currently the empty string "", since there are no actions for a MediaSelectPermission.

Specified by:
getActions in class Permission
Returns:
The empty string "".