2017-04-20 13:49:55 +02:00
|
|
|
Ext.namespace('Zarafa.plugins.mdm.data');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class Zarafa.plugins.mdm.data.JsonDeviceFolderReader
|
|
|
|
* @extends Zarafa.core.data.JsonReader
|
|
|
|
*
|
|
|
|
* This extension of the {@link Zarafa.core.data.JsonReader} supports
|
|
|
|
* {@link Zarafa.plugins.mdm.data.MDMDeviceStore stores} which can hold different type of
|
|
|
|
* {@link Zarafa.plugins.mdm.data.MDMDeviceRecord records}.
|
|
|
|
*/
|
|
|
|
Zarafa.plugins.mdm.data.JsonDeviceFolderReader = Ext.extend(Zarafa.core.data.JsonReader, {
|
2018-01-18 14:36:42 +01:00
|
|
|
|
2017-04-20 13:49:55 +02:00
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} meta Metadata configuration options.
|
|
|
|
* @param {Object} recordType (optional) Optional Record type matches the type
|
|
|
|
* which must be read from response. If no type is given, it will use the
|
2018-01-18 14:36:42 +01:00
|
|
|
* record type for the {@link Zarafa.core.data.RecordCustomObjectType#MDM_Device_Folder}.
|
2017-04-20 13:49:55 +02:00
|
|
|
*/
|
|
|
|
constructor: function (meta, recordType)
|
|
|
|
{
|
|
|
|
meta = Ext.applyIf(meta || {}, {
|
|
|
|
id: 'folderid',
|
|
|
|
idProperty: 'folderid',
|
|
|
|
dynamicRecord: false
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!Ext.isDefined(recordType)) {
|
2018-01-18 14:36:42 +01:00
|
|
|
recordType = Zarafa.core.data.RecordFactory.getRecordClassByCustomType(meta.customObjectType);
|
2017-04-20 13:49:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Zarafa.plugins.mdm.data.JsonDeviceFolderReader.superclass.constructor.call(this, meta, recordType);
|
|
|
|
}
|
|
|
|
});
|