diff --git a/core/core.js b/core/core.js index 99b05f345d..3e1d3694d5 100644 --- a/core/core.js +++ b/core/core.js @@ -1637,7 +1637,7 @@ exports._objectDescriptorDescriptor = { var info = Montage.getInfoForObject(this); var self = info && !info.isInstance ? this : this.constructor; if (!Object.getOwnPropertyDescriptor(self, "_objectDescriptor") || !self._objectDescriptor) { - var objectDescriptorModuleId = self.objectDescriptorModuleId || self.blueprintModuleId; + var objectDescriptorModuleId = self.objectDescriptorModuleId; if (!objectDescriptorModuleId) { throw new TypeError("ObjectDescriptor moduleId undefined for the module '" + JSON.stringify(self) + "'"); } diff --git a/core/meta/event-descriptor.js b/core/meta/event-descriptor.js index f3b80451a7..7613563a34 100644 --- a/core/meta/event-descriptor.js +++ b/core/meta/event-descriptor.js @@ -48,7 +48,7 @@ exports.EventDescriptor = Montage.specialize( /** @lends EventDescriptor# */ { deserializeSelf: { value:function (deserializer) { this._name = deserializer.getProperty("name"); - this._owner = deserializer.getProperty("objectDescriptor") || deserializer.getProperty("blueprint"); + this._owner = deserializer.getProperty("objectDescriptor"); this.detailKeys = this._getPropertyWithDefaults(deserializer, "detailKeys"); this.helpKey = this._getPropertyWithDefaults(deserializer, "helpKey"); } diff --git a/core/meta/model.js b/core/meta/model.js index b1554936a4..150a1847bc 100644 --- a/core/meta/model.js +++ b/core/meta/model.js @@ -70,11 +70,11 @@ var Model = exports.Model = Montage.specialize( /** @lends Model.prototype # */ this._name = deserializer.getProperty("name"); //copy contents into the objectDescriptors array - value = deserializer.getProperty("objectDescriptors") || deserializer.getProperty("blueprints"); + value = deserializer.getProperty("objectDescriptors"); if (value) { this._objectDescriptors = value; } - this.modelInstanceModuleId = deserializer.getProperty("objectModelModuleId") || deserializer.getProperty("binderModuleId"); + this.modelInstanceModuleId = deserializer.getProperty("objectModelModuleId"); } }, diff --git a/core/meta/object-descriptor-reference.js b/core/meta/object-descriptor-reference.js index 0a60c9760e..196bc3bf5a 100644 --- a/core/meta/object-descriptor-reference.js +++ b/core/meta/object-descriptor-reference.js @@ -25,7 +25,7 @@ exports.ObjectDescriptorReference = RemoteReference.specialize( { } return [ "objectDescriptor", - (this._reference.objectDescriptorName || this._reference.blueprintName || "unnamed").toLowerCase(), + (this._reference.objectDescriptorName || "unnamed").toLowerCase(), "reference" ].join("_"); } @@ -34,9 +34,8 @@ exports.ObjectDescriptorReference = RemoteReference.specialize( { valueFromReference: { value: function (references) { - // TODO: references.blueprintModule && references.binderReference are deprecated. - var objectDescriptorModule = references.objectDescriptorModule || references.blueprintModule, - modelReference = references.modelReference || references.binderReference, + var objectDescriptorModule = references.objectDescriptorModule, + modelReference = references.modelReference, modelPromise = Promise.resolve(ModelModule.Model.group.defaultModel); if (modelReference) { modelPromise = ModelReference.prototype.valueFromReference(modelReference, require); diff --git a/core/meta/object-descriptor.js b/core/meta/object-descriptor.js index c472921198..49491c87b6 100644 --- a/core/meta/object-descriptor.js +++ b/core/meta/object-descriptor.js @@ -90,7 +90,7 @@ var ObjectDescriptor = exports.ObjectDescriptor = Montage.specialize( /** @lends if (value) { this._model = value; } - this.objectDescriptorInstanceModule = deserializer.getProperty("objectDescriptorModule") || deserializer.getProperty("blueprintModule"); + this.objectDescriptorInstanceModule = deserializer.getProperty("objectDescriptorModule"); parentReference = deserializer.getProperty("parent"); if (parentReference && parentReference.promise && parentReference.valueFromReference) { deprecate.deprecationWarningOnce("parent reference via ObjectDescriptorReference", "direct reference with object syntax"); @@ -101,16 +101,16 @@ var ObjectDescriptor = exports.ObjectDescriptor = Montage.specialize( /** @lends this.customPrototype = this._getPropertyWithDefaults(deserializer, "customPrototype"); // - value = deserializer.getProperty("propertyDescriptors") || deserializer.getProperty("propertyBlueprints"); + value = deserializer.getProperty("propertyDescriptors"); if (value) { this._propertyDescriptors = value; } - value = deserializer.getProperty("propertyDescriptorGroups") || deserializer.getProperty("propertyBlueprintGroups"); + value = deserializer.getProperty("propertyDescriptorGroups"); if (value) { this._propertyDescriptorGroups = value; } - value = deserializer.getProperty("eventDescriptors") || deserializer.getProperty("eventBlueprints"); + value = deserializer.getProperty("eventDescriptors"); if (value) { this._eventDescriptors = value; } @@ -321,7 +321,7 @@ var ObjectDescriptor = exports.ObjectDescriptor = Montage.specialize( /** @lends }, /** - * Blueprint parent + * ObjectDescriptor parent * @type {?ObjectDescriptor} */ parent: { @@ -526,7 +526,7 @@ var ObjectDescriptor = exports.ObjectDescriptor = Montage.specialize( /** @lends /** * List of properties descriptor groups names - * @returns {Array.} + * @returns {Array.} */ propertyDescriptorGroups: { get: function () { @@ -598,7 +598,7 @@ var ObjectDescriptor = exports.ObjectDescriptor = Montage.specialize( /** @lends * @function * @param {string} property to add * @param {string} name of the group - * @returns {Array.} property descriptor group + * @returns {Array.} property descriptor group */ addPropertyDescriptorToGroupNamed: { value: function (propertyDescriptor, groupName) { diff --git a/core/meta/object-property.js b/core/meta/object-property.js index 2fde0e07db..d431f30806 100644 --- a/core/meta/object-property.js +++ b/core/meta/object-property.js @@ -38,7 +38,7 @@ exports.ObjectProperty = Montage.specialize( /** @lends ObjectProperty# */ { * * @function * @param {Object} prototype - * @param {Blueprint} blueprint + * @param {ObjectDescriptor} objectDescriptor */ apply: { value: function (prototype, objectDescriptor) { @@ -70,11 +70,11 @@ exports.ObjectProperty = Montage.specialize( /** @lends ObjectProperty# */ { }, /** - * Add all the properties defined in the blueprint to the target prototype. + * Add all the properties defined in the objectDescriptor to the target prototype. * * @function * @param {Object} prototype - * @param {Blueprint} blueprint + * @param {ObjectDescriptor} objectDescriptor */ addProperties: { value: function (prototype, objectDescriptor) { diff --git a/core/meta/property-descriptor.js b/core/meta/property-descriptor.js index 11ae2fdec8..5d8ba37d3f 100644 --- a/core/meta/property-descriptor.js +++ b/core/meta/property-descriptor.js @@ -102,7 +102,7 @@ exports.PropertyDescriptor = Montage.specialize( /** @lends PropertyDescriptor# deserializeSelf: { value:function (deserializer) { this._name = deserializer.getProperty("name"); - this._owner = deserializer.getProperty("objectDescriptor") || deserializer.getProperty("blueprint"); + this._owner = deserializer.getProperty("objectDescriptor"); this.cardinality = this._getPropertyWithDefaults(deserializer, "cardinality"); if (this.cardinality === -1) { this.cardinality = Infinity; @@ -114,7 +114,7 @@ exports.PropertyDescriptor = Montage.specialize( /** @lends PropertyDescriptor# this.collectionValueType = this._getPropertyWithDefaults(deserializer, "collectionValueType"); this.valueObjectPrototypeName = this._getPropertyWithDefaults(deserializer, "valueObjectPrototypeName"); this.valueObjectModuleId = this._getPropertyWithDefaults(deserializer, "valueObjectModuleId"); - this._valueDescriptorReference = this._getPropertyWithDefaults(deserializer, "valueDescriptor", "targetBlueprint"); + this._valueDescriptorReference = this._getPropertyWithDefaults(deserializer, "valueDescriptor"); this.enumValues = this._getPropertyWithDefaults(deserializer, "enumValues"); this.defaultValue = this._getPropertyWithDefaults(deserializer, "defaultValue"); this.helpKey = this._getPropertyWithDefaults(deserializer, "helpKey"); diff --git a/core/meta/user-interface-descriptor.js b/core/meta/user-interface-descriptor.js index dd084fe5d8..f4325ae02e 100644 --- a/core/meta/user-interface-descriptor.js +++ b/core/meta/user-interface-descriptor.js @@ -16,7 +16,7 @@ Javier want to be able to define which columns should be used in a table, the ra if a user resize a column, where does it get saved? The table would ask the object what does it has for a table. -Needs groups of properties, like in blueprint +Needs groups of properties, like in objectDescriptor When serializing their states, a table view that is data driven, the user tweaks needs to be stored by component unique id and by the type they displayed at the time of change */ @@ -27,7 +27,7 @@ When serializing their states, a table view that is data driven, the user tweaks */ exports.UserInterfaceDescriptor = Montage.specialize( /** @lends UserInterfaceDescriptor.prototype # */ { /** - * The object a UserInterfaceDescriptor describes. This is intented be an ObjectDescriptor/blueprint or a PropertyDescriptor/PropertyBlueprint + * The object a UserInterfaceDescriptor describes. This is intented be an ObjectDescriptor or a PropertyDescriptor * * @type {object} descriptor */ @@ -102,8 +102,8 @@ exports.UserInterfaceDescriptor = Montage.specialize( /** @lends UserInterfaceDe }, /** - * An array of UserInterfaceDescriptors that individually describe the PropertyDescriptors/PropertyBlueprints of this object's descriptor's PropertyDescriptors - * An ObjectDescriptor/Blueprint has groups of propery descriptors that should be respected in term of organization + * An array of UserInterfaceDescriptors that individually describe the PropertyDescriptors of this object's descriptor's PropertyDescriptors + * An ObjectDescriptor has groups of propery descriptors that should be respected in term of organization * * @type {Component} propertyUserInterfaceDescriptors */ diff --git a/core/meta/validation-rule.js b/core/meta/validation-rule.js index 53df833b97..ff6f5b6b3c 100644 --- a/core/meta/validation-rule.js +++ b/core/meta/validation-rule.js @@ -44,7 +44,7 @@ exports.PropertyValidationRule = Montage.specialize( /** @lends PropertyValidati deserializeSelf: { value: function (deserializer) { this._name = deserializer.getProperty("name"); - this._owner = deserializer.getProperty("objectDescriptor") || deserializer.getProperty("blueprint"); + this._owner = deserializer.getProperty("objectDescriptor"); // this._validationSelector = deserializer.getProperty("validationSelector"); this._messageKey = deserializer.getProperty("messageKey"); // FIXME [PJYF Jan 8 2013] There is an API issue in the deserialization @@ -152,7 +152,7 @@ exports.PropertyValidationRule = Montage.specialize( /** @lends PropertyValidati evaluateRule: { value: function (objectInstance) { if (this._propertyValidationEvaluator === null) { - var propertyValidationSemantics = new PropertyValidationSemantics().initWithBlueprint(this.objectDescriptor); + var propertyValidationSemantics = new PropertyValidationSemantics().initWithObjectDescriptor(this.objectDescriptor); this._propertyValidationEvaluator = propertyValidationSemantics.compile(this.selector.syntax); } return this._propertyValidationEvaluator(objectInstance); diff --git a/test/spec/meta/object-descriptor-spec.js b/test/spec/meta/object-descriptor-spec.js index 575884df9a..6fa0fe2e3a 100644 --- a/test/spec/meta/object-descriptor-spec.js +++ b/test/spec/meta/object-descriptor-spec.js @@ -309,13 +309,12 @@ describe("meta/object-descriptor-spec", function () { isInstance: { value: true } }); - expect(sub.objectDescriptorModuleId === "pass.meta" || sub.objectDescriptorModuleId === "pass.mjson").toBeTruthy(); + expect(sub.objectDescriptorModuleId === "pass.mjson").toBeTruthy(); }); it("creates an objectDescriptor when the parent has no objectDescriptor", function (done) { ObjectDescriptor.objectDescriptor.then(function (objectDescriptor){ - expect( objectDescriptor.objectDescriptorInstanceModule.id === "core/meta/blueprint.meta" || - objectDescriptor.objectDescriptorInstanceModule.id === "core/meta/object-descriptor.mjson").toBeTruthy(); + expect(objectDescriptor.objectDescriptorInstanceModule.id).toEqual("core/meta/object-descriptor.mjson"); }, function (err) { fail(err); }).finally(function () {