Ext.namespace('Zarafa.plugins.mdm.data'); /** * @class Zarafa.plugins.mdm.data.MDMDeviceResponseHandler * @extends Zarafa.core.data.ProxyResponseHandler * * A Simple implementation for a {@link Zarafa.plugins.mdm.data.MDMDeviceResponseHandler ResponseHandler}. * This one can only be used by {@link Ext.data.DataProxy proxies} which wish to handle a Response * to their Request. * * This implementation limits itself to firing an {@link Ext.data.DataProxy#exception exception} * on error, and calling a callback function when all processing has been completed. */ Zarafa.plugins.mdm.data.MDMDeviceResponseHandler = Ext.extend(Zarafa.core.data.ProxyResponseHandler, { /** * Handles the list response. Gathers the stores from the response data, converts each entry * into a {@link Zarafa.core.MAPIStore MAPIStore} and pushes them into the collectedItems. * @param {Object} data The response object belonging to the given command. * @return {Boolean} False when action could not be handled successfully. This will * not cancel the transaction itself, but rather causes the 'success' argument for the * {@link #done} function to be false. */ doOpen: function(response) { this.receivedRecords = this.readRecordsFromResponse(response, 'item'); }, /** * Handles the list response. Gathers the stores from the response data, converts each entry * into a {@link Zarafa.core.MAPIStore MAPIStore} and pushes them into the collectedItems. * @param {Object} data The response object belonging to the given command. * @return {Boolean} False when action could not be handled successfully. This will * not cancel the transaction itself, but rather causes the 'success' argument for the * {@link #done} function to be false. */ doList: function(response) { this.receivedRecords = this.readRecordsFromResponse(response, 'item'); } });