Methods for new "maps" property in TD Root

Methods for new "maps" property in
Template Data JSON root added to
the Template Specification Model

* Added maps property to MWTemplateSpecModel
* Maps filled in extend function
* Added getter function for maps

Depends on I3bf5e002

Change-Id: Ic555093625358d8fc4cb1ca8c68793b5912e8ced
This commit is contained in:
Marielle Volz 2014-10-21 11:45:03 +01:00
parent fbc7ecbb8d
commit 2ac7959849

View file

@ -23,6 +23,7 @@ ve.dm.MWTemplateSpecModel = function VeDmMWTemplateSpecModel( template ) {
this.params = {};
this.paramOrder = [];
this.sets = [];
this.maps = {};
// Initialization
this.fill();
@ -70,6 +71,7 @@ ve.dm.MWTemplateSpecModel.prototype.extend = function ( data ) {
}
}
this.sets = data.sets;
this.maps = data.maps;
};
/**
@ -317,3 +319,12 @@ ve.dm.MWTemplateSpecModel.prototype.getParameterNames = function () {
ve.dm.MWTemplateSpecModel.prototype.getParameterSets = function () {
return this.sets;
};
/**
* Get map describing relationship between another content type and the parameters.
*
* @return {Object} Object with application property maps to parameters keyed to application name.
*/
ve.dm.MWTemplateSpecModel.prototype.getMaps = function () {
return this.maps;
};