org.ocap.shared.dvr
Interface ParentRecordingRequest

All Superinterfaces:
RecordingRequest

public interface ParentRecordingRequest
extends RecordingRequest

This interface represents information corresponding to a parent recording request. The recording request represented by this interface may have one or more child recording requests.

A parent recording request may be in the unresolved state, partially resolved state, completely resolved state, or the cancelled state.

A recording request would be in the unresolved state if the implementation does not have enough information to process this recording request. A recording request in this state may transition to partially resolved state, completely resolved state, or failed state.

A recording request would be in the partially resolved state if the implementation has enough information to schedule some, but not all, child recording requests corresponding to this recording request. This would be the case of a recording request for a series where some episodes for the series are scheduled. A recording request is in completely resolved state if all its child recordings are known and scheduled.


Field Summary
static int CANCELLED_STATE
          A recording request is in cancelled state, if an application has successfully called the cancel method for this recording request, but not all child recording request have been deleted.
static int COMPLETELY_RESOLVED_STATE
          All child recordings corresponding to this recording request have been scheduled.
static int PARTIALLY_RESOLVED_STATE
          Some recordings corresponding to this recording request have been scheduled.
static int UNRESOLVED_STATE
          The implementation does not have enough information to process this recording request.
 
Method Summary
 void cancel()
          Cancels the parent recording request.
 RecordingList getKnownChildren()
          Gets all the immediate child Recordings corresponding to this parent RecordingRequest.
 
Methods inherited from interface org.ocap.shared.dvr.RecordingRequest
addAppData, delete, getAppData, getAppID, getId, getKeys, getParent, getRecordingSpec, getRoot, getState, isRoot, removeAppData, reschedule, setRecordingProperties
 

Field Detail

UNRESOLVED_STATE

static final int UNRESOLVED_STATE
The implementation does not have enough information to process this recording request.

See Also:
Constant Field Values

COMPLETELY_RESOLVED_STATE

static final int COMPLETELY_RESOLVED_STATE
All child recordings corresponding to this recording request have been scheduled. A recording request is in completely resolved state, if the implementation has enough information to schedule all recordings corresponding to the recording request. A recording request in completely resolved state would have one or more child recordings.

See Also:
Constant Field Values

PARTIALLY_RESOLVED_STATE

static final int PARTIALLY_RESOLVED_STATE
Some recordings corresponding to this recording request have been scheduled. A recording request is in partially resolved state, if the implementation has enough information to schedule some, but not all recordings corresponding to the recording request. A recording request in partially resolved state may have zero, one or more child recordings.

See Also:
Constant Field Values

CANCELLED_STATE

static final int CANCELLED_STATE
A recording request is in cancelled state, if an application has successfully called the cancel method for this recording request, but not all child recording request have been deleted. A recording request in this state shall be deleted by the implementation once all child recording requests have been deleted.

See Also:
Constant Field Values
Method Detail

cancel

void cancel()
            throws java.lang.IllegalStateException,
                   AccessDeniedException
Cancels the parent recording request. The implementation shall also cancel all the child recording requests through calling their cancel() method. If any of these calls throw an exception, the process shall continue with the next child. No more child recordings will be scheduled for this recording request or for any of its child recordings. The recording request will be deleted from the database once all child recording requests have been deleted. Canceling a parent recording request does not delete any child recordings that cannot be cancelled (i.e. if a child recording request is not in a pending state). At the successful completion of this method the recording request would be deleted from the database or changed state to CANCELLED_STATE.

Throws:
java.lang.SecurityException - if the calling application does not have RecordingPermission("cancel",..) or RecordingPermission("*",..)
AccessDeniedException - if the calling application is not permitted to perform this operation by RecordingRequest specific security attributes.
java.lang.IllegalStateException - if the recording request is not in UNRESOLVED_STATE, PARTIALLY_RESOLVED_STATE or COMPLETELY_RESOLVED_STATE.

getKnownChildren

RecordingList getKnownChildren()
                               throws java.lang.IllegalStateException
Gets all the immediate child Recordings corresponding to this parent RecordingRequest. For a recording request in completely resolved state this method returns all children that are still maintained in the recording manager database (i.e. children removed from the database by calling the delete() or cancel() method will not be included in the list of child recordings). For a recording request in partially resolved state this method only returns currently known children for series.

Returns:
The list of child Recordings corresponding to this Recording; null if there are no child recording requests in the RecordingManager database.
Throws:
java.lang.IllegalStateException - if the recording request is not in PARTIALLY_RESOLVED_STATE or COMPLETELY_RESOLVED_STATE.