Class Index | File Index

Classes


Class finesse.restservices.PhoneBook

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

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
add(newValues, handlers)
Add
 
createPostSuccessHandler(phonebook, contentBody, successHandler)
 
createPutSuccessHandler(phonebook, contentBody, successHandler)
 
getContacts(handlers)
Getter for a Contacts collection object that is associated with PhoneBook.
 
Getter for node within PhoneBook - sometimes it's just a URI, sometimes it is a Contacts collection
 
Getter for the name.
 
Getter for the type flag.
 
Getter for the Uri value.
 
update(newValues, handlers)
Update
Class Detail
finesse.restservices.PhoneBook(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
add(newValues, handlers)
Add
Parameters:
newValues
handlers

createPostSuccessHandler(phonebook, contentBody, successHandler)
Parameters:
phonebook
contentBody
successHandler

createPutSuccessHandler(phonebook, contentBody, successHandler)
Parameters:
phonebook
contentBody
successHandler

{Contacts} getContacts(handlers)
Getter for a Contacts collection object that is associated with PhoneBook.
Parameters:
handlers
Returns:
{Contacts} A Contacts collection object.

{String} getEmbeddedContacts()
Getter for node within PhoneBook - sometimes it's just a URI, sometimes it is a Contacts collection
Returns:
{String} uri to contacts or {Contacts} collection

{String} getName()
Getter for the name.
Returns:
{String} The name.

{String} getType()
Getter for the type flag.
Returns:
{String} The type.

{String} getUri()
Getter for the Uri value.
Returns:
{String} The Uri.

update(newValues, handlers)
Update
Parameters:
newValues
handlers

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