Class finesse.restservices.MediaList
Extends
finesse.restservices.RestCollectionBase.
JavaScript representation of a MediaList collection object.
Defined in: finesse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class finesse.restservices.RestBase:
- restResponseStatus
Method Attributes | Method Name and Description |
---|---|
getMedia(options)
Getter for a Media from the MediaList collection.
|
- Methods borrowed from class finesse.restservices.RestCollectionBase:
- getCollection, refresh
- Methods borrowed from class finesse.restservices.RestBase:
- addHandler, getData, getId, getProperty, hasProperty, isLoaded, removeHandler
Class Detail
finesse.restservices.MediaList()
mediaList = _user.getMediaList( { onCollectionAdd : _handleMediaAdd, onCollectionDelete : _handleMediaDelete, onLoad : _handleMediaListLoaded }); _mediaCollection = mediaList.getCollection(); for (var mediaId in _mediaCollection) { if (_mediaCollection.hasOwnProperty(mediaId)) { media = _mediaCollection[mediaId]; etc... } }
Method Detail
{finesse.restservices.Media}
getMedia(options)
Getter for a Media from the MediaList collection.
* @param {Object} options
An object with the following properties:
- id: The id of the media to fetch
- onLoad(this): (optional) callback handler for when the object is successfully loaded from the server
- onChange(this): (optional) callback handler for when an update notification of the object is received
- onAdd(this): (optional) callback handler for when a notification that the object is created is received
- onDelete(this): (optional) callback handler for when a notification that the object is deleted is received
- onError(rsp): (optional) callback handler for if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- mediaOptions: {Object} An object with the following properties:
- maxDialogLimit: The id of the object being constructed
- interruptAction: Accept or ignore interrupts
- dialogLogoutAction: transfer or close the task at logout time
- Parameters:
- options
- Returns:
- {finesse.restservices.Media} A Media object.