"use strict"; /** * Value object for change template item. * * @constructor */ function ChangeTemplateVO() { // simple fields this.name = ''; this.summary = ''; this.id = ''; this.type = 'changeTemplate'; this.desc = ''; // complex fields this.company = null; this.templateObject = null; // derived fields this.impact = ''; this.urgency = ''; this.priority = ''; this.riskLevel = ''; this.timing = ''; this.changeReason = ''; this.impactedService = ''; this.categorizations = []; this.allCategories = []; } /** * Setup inheritance chain. */ ChangeTemplateVO.prototype = Object.create(BaseVO.prototype); ChangeTemplateVO.prototype.constructor = ChangeTemplateVO; /** * @override * @return {Array} */ ChangeTemplateVO.prototype.getProps = function () { return BaseVO.prototype.getProps().concat('name', 'summary', 'desc', 'templateObject', 'company'); }; /** * @override */ ChangeTemplateVO.prototype.postBuild = function () { var template = this.templateObject; if (template) { this.impact = template.impact; this.urgency = template.urgency; this.priority = template.priority; this.riskLevel = template.riskLevel; this.timing = template.timing; this.changeReason = template.changeReason; this.impactedService = template.impactedService; this.categorizations = template.categorizations; } };