Class Index | File Index

Classes


Class finesse.restservices.Dialogs

JavaScript representation of a Dialogs collection object. Also exposes methods to operate on the object against the server.
Defined in: Dialogs.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
createNewBargeCall(fromAddress, toAddress, actionType, dialogUri, handlers)
Create a new Dialog in this collection as a result of a requested action
 
createNewCallDialog(toAddress, fromAddress, handlers)
Create a new Dialog in this colleciton
 
createNewSuperviseCallDialog(toAddress, fromAddress, actionType, handlers)
Create a new Dialog in this colleciton as a result of a requested action
Class Detail
finesse.restservices.Dialogs(options)
Parameters:
{Object} options
An object with the following properties:
  • id: The id of the object being constructed
  • onLoad(this): (optional) when the object is successfully loaded from the server
  • onChange(this): (optional) when an update notification of the object is received
  • onAdd(this): (optional) when a notification that the object is created is received
  • onDelete(this): (optional) when a notification that the object is deleted is received
  • onError(rsp): (optional) 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
  • parentObj: (optional) The parent object
Method Detail
createNewBargeCall(fromAddress, toAddress, actionType, dialogUri, handlers)
Create a new Dialog in this collection as a result of a requested action
Parameters:
{String} fromAddress
The from address of the new Dialog
{String} toAddress
The to address of the new Dialog
{String} actionType
The associated action to request for creating this new dialog
{String} dialogUri
The associated uri of SUPERVISOR_MONITOR call
{Object} handlers
An object containing the following (optional) handlers for the request:
  • success(rsp): A callback function for a successful request to be invoked with the following response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response
  • A error callback function for an unsuccessful request to be invoked with the error response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response (HTTP errors)
    • error: {Object} Wrapped exception that was caught:
      • errorType: {String} Type of error that was caught
      • errorMessage: {String} Message associated with error

createNewCallDialog(toAddress, fromAddress, handlers)
Create a new Dialog in this colleciton
Parameters:
{String} toAddress
The to address of the new Dialog
{String} fromAddress
The from address of the new Dialog
{Object} handlers
An object containing the following (optional) handlers for the request:
  • success(rsp): A callback function for a successful request to be invoked with the following response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response
  • A error callback function for an unsuccessful request to be invoked with the error response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response (HTTP errors)
    • error: {Object} Wrapped exception that was caught:
      • errorType: {String} Type of error that was caught
      • errorMessage: {String} Message associated with error

createNewSuperviseCallDialog(toAddress, fromAddress, actionType, handlers)
Create a new Dialog in this colleciton as a result of a requested action
Parameters:
{String} toAddress
The to address of the new Dialog
{String} fromAddress
The from address of the new Dialog
{String} actionType
The associated action to request for creating this new dialog
{Object} handlers
An object containing the following (optional) handlers for the request:
  • success(rsp): A callback function for a successful request to be invoked with the following response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response
  • A error callback function for an unsuccessful request to be invoked with the error response object as its only parameter:
    • status: {Number} The HTTP status code returned
    • content: {String} Raw string of response
    • object: {Object} Parsed object of response (HTTP errors)
    • error: {Object} Wrapped exception that was caught:
      • errorType: {String} Type of error that was caught
      • errorMessage: {String} Message associated with error

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jul 24 2013 18:47:09 GMT-0400 (EDT)