org.ocap.shared.dvr
Class RecordingPermission

java.lang.Object
  extended by java.security.Permission
      extended by java.security.BasicPermission
          extended by org.ocap.shared.dvr.RecordingPermission
All Implemented Interfaces:
java.io.Serializable, java.security.Guard

public final class RecordingPermission
extends java.security.BasicPermission

Controls access to recording features by an application. The name can be one of the values shown in the following list;

The action can be "own" and "*". The action "own" is intended for use by normal applications. The action "*" is intended for use only by specially privileged applications and permits the operation defined by the name to be applied to all RecordingRequests regardless of any per-application restrictions associated with the RecordingRequest.

Granting of this permission shall include granting access to any storage devices required for the operations specified in the name parameter. No additional low permissions (e.g. FilePermission) are subsequently needed.

See Also:
Serialized Form

Constructor Summary
RecordingPermission(java.lang.String name, java.lang.String action)
          Creates a new RecordingPermission with the specified name and action.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two RecordingPermission objects for equality
 java.lang.String getActions()
          Returns the actions as passed into the constructor.
 int hashCode()
          Returns the hash code value for this object.
 
Methods inherited from class java.security.BasicPermission
implies, newPermissionCollection
 
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

RecordingPermission

public RecordingPermission(java.lang.String name,
                           java.lang.String action)
Creates a new RecordingPermission with the specified name and action.

Parameters:
name - "create", "read", "modify", "delete", "cancel" or "*"
action - "own" or "*"
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks two RecordingPermission objects for equality

Overrides:
equals in class java.security.BasicPermission
Parameters:
obj - the object to test for equality with this object.
Returns:
true if obj is a RecordingPermission with the same name and action as this RecordingPermission object

hashCode

public int hashCode()
Returns the hash code value for this object. This method follows the general contract of Object.hashCode() -- specifically, two distinct instances of RecordingPermission which satisfy equals(...) must return the same hash code value.

Overrides:
hashCode in class java.security.BasicPermission
Returns:
a hash code value for this object.

getActions

public java.lang.String getActions()
Returns the actions as passed into the constructor.

Overrides:
getActions in class java.security.BasicPermission
Returns:
the actions as a String