
javax.tv.service.ReadPermission Maven / Gradle / Ivy
/*
* @(#)ReadPermission.java 1.5 00/08/28%
*
* Copyright 1998-2000 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*/
package javax.tv.service;
import java.security.Permission;
import javax.tv.locator.Locator;
import java.io.Serializable;
/**
* This class represents permission to read the data referenced by a given
* Locator
.
*
* @version 1.5, 08/28/00
*/
public final class ReadPermission extends Permission implements Serializable {
String actions = "";
/**
* Creates a new ReadPermission object for the specified locator.
*
* @param locator The locator. Null indicates permission for all locators.
*/
public ReadPermission(Locator locator) {
super(null);
}
/**
* 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.
*
* @param locator The external form of the locator. The string
* "*" indicates all locators.
*
* @param actions Should be null
. */
public ReadPermission(String locator, String actions) {
super(null);
}
/**
* Checks if this ReadPermission object "implies" the specified
* permission.
*
* More specificially, this method returns true if:
*
* - p is an instanceof ReadPermission, and
*
- p's locator's external form is matches this object's locator
* string, or this object's locator string is "*".
*
*
* @param p The permission to check against.
*
* @return true
if the specified permission is
* implied by this object, false
if not.
*/
public boolean implies(Permission p) {
return false;
}
/**
* Checks two ReadPermission objects for equality. Checks that
* other is a ReadPermission, and has the same locator
* as this object.
*
* @param other the object we are testing for equality with this
* object.
*
* @return true
if other
is of
* type ReadPermission
and has the same locator as
* this ReadPermission
object. */
public boolean equals(Object other) {
return false;
}
/**
* Returns the hash code value for this object.
*
* @return A hash code value for this object.
*/
public int hashCode() {
return 0;
}
/**
* Returns the canonical string representation of the actions,
* which currently is the empty string "", since there are no actions for
* a ReadPermission.
*
* @return the empty string "".
*/
public String getActions()
{
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy