Class finesse.restservices.ChatConfig
JavaScript representation of a ChatConfig object. Also exposes methods to operate
on the object against the server.
Defined in: finesse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.ChatConfig(id, callbacks)
|
Field Attributes | Field Name and Description |
---|---|
Returns whether this object supports subscriptions
|
Method Attributes | Method Name and Description |
---|---|
createPutSuccessHandler(chatconfig, chatSettings, successHandler)
Closure handle updating of the internal data for the ChatConfig object
upon a successful update (PUT) request before calling the intended
success handler provided by the consumer
|
|
get()
Retrieve the chat config settings
|
|
Getter for the Chat primary node of the ChatConfig
|
|
Gets the REST class for the current object - this is the ChatConfig object.
|
|
Gets the REST type for the current object - this is a "ChatConfig".
|
|
Overrides the parent class.
|
|
Getter for the Chat secondary node (if any) of the ChatConfig
|
|
update(chatSettings, handlers)
Update the chat config settings
|
Class Detail
finesse.restservices.ChatConfig(id, callbacks)
- Parameters:
- {String} id
- Not required...
- {Object} callbacks
- An object containing callbacks for instantiation and runtime
- {Function} callbacks.onLoad(this)
- Callback to invoke upon successful instantiation, passes in User object
- {Function} callbacks.onLoadError(rsp)
- Callback to invoke on instantiation REST request error as passed by finesse.clientservices.ClientServices.ajax() { 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 error.errorType: {String} Type of error that was caught error.errorMessage: {String} Message associated with error }
- {Function} callbacks.onChange(this)
- Callback to invoke upon successful update, passes in User object
- {Function} callbacks.onError(rsp)
- Callback to invoke on update error (refresh or event) as passed by finesse.clientservices.ClientServices.ajax() { 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 error.errorType: {String} Type of error that was caught error.errorMessage: {String} Message associated with error }
Field Detail
supportsSubscriptions
Returns whether this object supports subscriptions
Method Detail
{finesse.restservices.ChatConfig}
createPutSuccessHandler(chatconfig, chatSettings, successHandler)
Closure handle updating of the internal data for the ChatConfig object
upon a successful update (PUT) request before calling the intended
success handler provided by the consumer
- Parameters:
- {Object} chatconfig
- Reference to this ChatConfig object
- {Object} chatSettings
- Object that contains the chat server settings to be submitted in the api request
- {Function} successHandler
- The success handler specified by the consumer of this object
- Returns:
- {finesse.restservices.ChatConfig} This ChatConfig object to allow cascading
{finesse.restservices.ChatConfig}
get()
Retrieve the chat config settings
- Returns:
- {finesse.restservices.ChatConfig} This ChatConfig object to allow cascading
{String}
getPrimaryNode()
Getter for the Chat primary node of the ChatConfig
- Returns:
- {String}
getRestClass()
Gets the REST class for the current object - this is the ChatConfig object.
getRestType()
Gets the REST type for the current object - this is a "ChatConfig".
getRestUrl()
Overrides the parent class. Returns the url for the ChatConfig resource
{String}
getSecondaryNode()
Getter for the Chat secondary node (if any) of the ChatConfig
- Returns:
- {String}
{finesse.restservices.ChatConfig}
update(chatSettings, handlers)
Update the chat config settings
- Parameters:
- {Object} chatSettings
- The Chat server settings you want to configure
- {Object} handlers
- An object containing callback handlers for the request. Optional.
- {Function} options.success(rsp)
- A callback function to be invoked for a successful request. { status: {Number} The HTTP status code returned content: {String} Raw string of response object: {Object} Parsed object of response }
- {Function} options.error(rsp)
- A callback function to be invoked for an unsuccessful request. { 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 error.errorType: {String} Type of error that was caught error.errorMessage: {String} Message associated with error }
- Returns:
- {finesse.restservices.ChatConfig} This ChatConfig object to allow cascading