38 lines
875 B
JavaScript
38 lines
875 B
JavaScript
"use strict";
|
|
/**
|
|
* Value object for application screens config.
|
|
*
|
|
* @author Igor Samulenko
|
|
* @constructor
|
|
*/
|
|
function ApplicationConfigurationVO() {
|
|
// simple fields
|
|
this.id = '';
|
|
this.name = '';
|
|
this.version = '';
|
|
this.tenantId = '';
|
|
// complex fields
|
|
this.screens = [];
|
|
}
|
|
/**
|
|
* Setup inheritance chain.
|
|
*/
|
|
ApplicationConfigurationVO.prototype = Object.create(BaseVO.prototype);
|
|
ApplicationConfigurationVO.prototype.constructor = ApplicationConfigurationVO;
|
|
/**
|
|
* @override
|
|
* @return {Array}
|
|
*/
|
|
ApplicationConfigurationVO.prototype.getProps = function () {
|
|
return ['id', 'name', 'version', 'tenantId', 'screens'];
|
|
};
|
|
/**
|
|
* @override
|
|
*/
|
|
ApplicationConfigurationVO.prototype.postBuild = function () {
|
|
this.screens = this.screens
|
|
.map(function (item) {
|
|
return new ScreenConfigurationVO().build(item);
|
|
});
|
|
};
|