SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/common/vo/social-profile-vo.js

39 lines
1.2 KiB
JavaScript

"use strict";
function SocialProfileVO() {
this.jid = '';
this.elementId = '';
this.available = '';
this.deleted = false;
this.desc = '';
this.displayName = '';
this.firstName = '';
this.lastName = '';
this.tenantId = '';
this.profileType = '';
this.extraData = '';
this.thumbnail = '';
}
/**
* Setup inheritance chain.
*/
SocialProfileVO.prototype = new BaseVO();
SocialProfileVO.prototype.constructor = SocialProfileVO;
/**
* @override
* @return {Array}
*/
SocialProfileVO.prototype.getProps = function () {
return BaseVO.prototype.getProps().concat('jid', 'elementId', 'available', 'deleted', 'desc', 'displayName', 'firstName', 'lastName', 'tenantId', 'profileType', 'extraData', 'thumbnail');
};
SocialProfileVO.prototype.postBuild = function () {
if (this.elementId.indexOf(' ') >= 0) {
this.elementId = this.elementId.replace(/\s+/g, '_');
if (this.jid) {
this.jid = this.jid.replace(/\s+/g, '_');
}
}
this.extraData = this.extraData ? JSON.parse(this.extraData) : {};
this.available = (this.available || 'UNKNOWN');
this.jid = this.jid || [this.elementId, this.tenantId].join('_');
};