|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RecordingRequest
This interface represents information corresponding to a recording request. The recording request represented by this interface may correspond to a single recording request or a series of other recording requests. Recording requests are hierarchical in nature. Implementations may resolve a recording request to a single recording request or to a series of other recording requests each of which may get further resolved into a single recording request or a series of recording requests. For example, a recording request for "Sex and the City" may resolve to multiple recording requests, each for a particular season of the show. Each of these recording requests may get further resolved into multiple recording requests, each for a single episode. The implementation creates a recording request in response to the RecordingManager.record(RecordingSpec) method. The implementation also creates recording requests when a recording request is further resolved.
A recording request may either be a parent recording request or a leaf
recording request. States for a recording request are defined in
ParentRecordingRequest
and LeafRecordingRequest
. A
recording request may be in any of the states corresponding to a leaf
recording request or a parent recording request.
Method Summary | |
---|---|
void |
addAppData(java.lang.String key,
java.io.Serializable data)
Add application specific private data. |
void |
delete()
Deletes the recording request from the database. |
java.io.Serializable |
getAppData(java.lang.String key)
Get application data corresponding to specified key. |
AppID |
getAppID()
Gets the application identifier of the application that owns this recording request. |
int |
getId()
Returns an identifier for this recording request. |
java.lang.String[] |
getKeys()
Get all keys for Application specific data associated with this recording request. |
RecordingRequest |
getParent()
Gets the parent recording request corresponding to this recording request. |
RecordingSpec |
getRecordingSpec()
Returns the RecordingSpec corresponding to the recording request. |
RecordingRequest |
getRoot()
Gets the root recording request corresponding to this recording request. |
int |
getState()
Returns the state of the recording request. |
boolean |
isRoot()
Checks whether the recording request was a root recording request generated when the application called the RecordingManager.record(..) |
void |
removeAppData(java.lang.String key)
Remove Application specific private data corresponding to the specified key. |
void |
reschedule(RecordingSpec newRecordingSpec)
Modify the details of a recording request. |
void |
setRecordingProperties(RecordingProperties properties)
Modify the RecordingProperties corresponding to the RecordingSpec for this recording request. |
Method Detail |
---|
int getState()
boolean isRoot()
RecordingRequest getRoot()
If the current recording request is a root recording request, the current recording request is returned.
RecordingRequest getParent()
RecordingSpec getRecordingSpec()
When the implementation generates a recording request while resolving another recording request, a new instance of the RecordingSpec is created with an identical copy of the RecordingProperties of the parent recording request.
void setRecordingProperties(RecordingProperties properties) throws java.lang.IllegalStateException, AccessDeniedException
properties
- the new recording properties to set.
java.lang.IllegalStateException
- if changing one of the parameters that
has been modified in the new recording properties is not legal
for the current state of the recording request.
AccessDeniedException
- if the calling application is not
permitted to perform this operation by RecordingRequest specific
security attributes.
java.lang.SecurityException
- if the calling application does not have
RecordingPermission("modify",..) or RecordingPermission("*",..)void delete() throws AccessDeniedException
RecordedService
objects and all recorded
elementary streams (e.g., files and directory entries) associated with
the RecordedService. If any application calls any method on stale
references of removed objects the implementation shall throw an
IllegalStateException.
If the recording request is in any of the IN_PROGRESS states the
implementation will stop the recording before deleting the recording
request. If a RecordedService was being presented when it was deleted,
a PresentationTerminatedEvent
will
be sent with reason SERVICE_VANISHED.
AccessDeniedException
- if the calling application is not
permitted to perform this operation by RecordingRequest specific
security attributes.
java.lang.SecurityException
- if the calling application does not have
RecordingPermission("delete",..) or RecordingPermission("*",..)void addAppData(java.lang.String key, java.io.Serializable data) throws NoMoreDataEntriesException, AccessDeniedException
key
- the ID under which the data is to be addeddata
- the data to be added
java.lang.SecurityException
- if the calling application does not have
RecordingPermission("modify",..) or RecordingPermission("*",..)
java.lang.IllegalArgumentException
- if the size of the data is
more than the size supported by the implementation
within the constraints of the GEM recording specification
NoMoreDataEntriesException
- if storing this data exceeds
the number of entries supported by the implementation
within the constraints of the GEM recording specification
AccessDeniedException
- if the calling application is not
permitted to perform this operation by RecordingRequest specific
security attributes.AppID getAppID()
java.lang.String[] getKeys()
java.io.Serializable getAppData(java.lang.String key)
key
- the key under which any data is to be returned
void removeAppData(java.lang.String key) throws AccessDeniedException
key
- the key under which data is to be removed
AccessDeniedException
- if the calling application is not
permitted to perform this operation by RecordingRequest specific
security attributes.
java.lang.SecurityException
- if the calling application does not have
RecordingPermission("modify",..) or RecordingPermission("*",..)void reschedule(RecordingSpec newRecordingSpec) throws AccessDeniedException
Note: If the recording request or one of its child recording request is in IN_PROGRESS_STATE or IN_PROGRESS_INSUFFICIENT_SPACE_STATE, any changes to the start time shall be ignored. In this case all other valid parameters are applied. If the new value for a parameter is not valid (e.g. the start-time and the duration is in the past), the implementation shall ignore that parameter. In-progress recordings shall continue uninterrupted, if the new recording spec does not request the recording to be stopped.
newRecordingSpec
- the new recording spec that
shall be used to reschedule the root RecordingRequest.
java.lang.IllegalArgumentException
- if the new recording spec
and the current recording spec for the recording request are
different sub-classes of RecordingSpec.
java.lang.IllegalStateException
- If a LeafRecordingRequest is not in
a pending or an in-progress state. If a ParentRecordingRequest
is in the cancelled state.
AccessDeniedException
- if the calling application is not
permitted to perform this operation by RecordingRequest specific
security attributes.
java.lang.SecurityException
- if the calling application does not have
RecordingPermission("modify",..) or RecordingPermission("*",..)*int getId()
Since identifiers may be held in persistent storage by applications, implementations should not re-use identifiers of recording requests which are no longer held in the GEM recording terminal as this would confuse applications which still have references to those recording requests in their persistent storage.
RecordingManager.getRecordingRequest(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |