Java DTV API 1.3
18-Nov-2009

com.sun.dtv.application
Class AppManagerPermission

java.lang.Object
  extended by java.security.Permission
      extended by com.sun.dtv.application.AppManagerPermission
All Implemented Interfaces:
Serializable, Guard

public class AppManagerPermission
extends Permission

AppManagerPermission is needed to query or control applications. To query the available applications the "read" action is required. To manage the lifecycle of another application the "manage" action is required. To fetch new applications the "fetch" action is required.

See Also:
Serialized Form

Constructor Summary
AppManagerPermission(String name, String actions)
          Construct a new AppManagerPermission with the requested resource and actions.
 
Method Summary
 boolean equals(Object obj)
          Checks two AppManagerPermission 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 AppManagerPermission 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

AppManagerPermission

public AppManagerPermission(String name,
                            String actions)
Construct a new AppManagerPermission with the requested resource and actions. The resource name is the appId of the application to be managed. It may be "*" to allow access to all applications.

Parameters:
name - the name of the application to allow access to or "*" to allow access to all applications.
actions - contains a comma-separated list of the desired actions granted. Possible actions are "read", "fetch", and "manage".
Method Detail

getActions

public String getActions()
Returns the "canonical string representation" of the actions. That is, this method always returns present actions in the following order: read, fetch, manage. For example, if this AppManagerPermission object allows both manage, fetch and read actions, a call to getActions will return the string "read,fetch,manage".

Specified by:
getActions in class Permission
Returns:
the actions in canonical string representation.

equals

public boolean equals(Object obj)
Checks two AppManagerPermission objects for equality. Checks that obj is a AppManagerPermission, and has the same name and actions as this object.

Specified by:
equals in class Permission
Parameters:
obj - the object to be tested for equality with this object.
Returns:
true if obj is a AppManagerPermission and has the same name and actions as this AppManagerPermission object.

hashCode

public int hashCode()
Returns the hash code value for this object. The hash code used is the hash code of this permissions name plus the hashcode of the actions, that is, getName().hashCode() + getActions.hashCode(), where getName is from the Permission superclass and getActions is in this class.

Specified by:
hashCode in class Permission
Returns:
a hash code value for this object.

implies

public boolean implies(Permission p)
Checks if this AppManagerPermission object "implies" the specified permission. More specifically, this method returns true if:

Specified by:
implies in class Permission
Parameters:
p - the Permission to check.
Returns:
true iff this permission implies Permission p.

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.