53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
"use strict";
|
|
/**
|
|
* Created by andey on 24-11-2016.
|
|
*/
|
|
/**
|
|
* Value object for release template item.
|
|
*
|
|
* @constructor
|
|
*/
|
|
function ReleaseTemplateVO() {
|
|
// simple fields
|
|
this.name = '';
|
|
this.summary = '';
|
|
this.id = '';
|
|
this.type = 'releaseTemplate';
|
|
this.desc = '';
|
|
// complex fields
|
|
this.company = null;
|
|
this.templateObject = null;
|
|
// derived fields
|
|
this.releaseType = '';
|
|
this.impact = '';
|
|
this.urgency = '';
|
|
this.riskLevel = '';
|
|
this.categorizations = [];
|
|
}
|
|
/**
|
|
* Setup inheritance chain.
|
|
*/
|
|
ReleaseTemplateVO.prototype = Object.create(BaseVO.prototype);
|
|
ReleaseTemplateVO.prototype.constructor = ReleaseTemplateVO;
|
|
/**
|
|
* @override
|
|
* @return {Array}
|
|
*/
|
|
ReleaseTemplateVO.prototype.getProps = function () {
|
|
return BaseVO.prototype.getProps().concat('name', 'summary', 'desc', 'templateObject', 'company');
|
|
};
|
|
/**
|
|
* @override
|
|
*/
|
|
ReleaseTemplateVO.prototype.postBuild = function () {
|
|
var template = this.templateObject;
|
|
if (template) {
|
|
this.releaseType = template.releaseType;
|
|
this.impact = template.impact;
|
|
this.urgency = template.urgency;
|
|
this.riskLevel = template.riskLevel;
|
|
this.categorizations = template.categorizations;
|
|
this.impactedService = template.impactedService;
|
|
}
|
|
};
|