diff options
author | Michael Lando <ml636r@att.com> | 2017-06-11 14:22:02 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-06-11 17:48:32 +0300 |
commit | b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 (patch) | |
tree | 0609319203be13f6c29ccbe24cb39c9d64f90095 /catalog-ui/src/app/models/property-fe-model.ts | |
parent | af9929df75604ce407d0ca542b200630164e0ae6 (diff) |
[SDC-29] rebase continue work to align source
Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/models/property-fe-model.ts')
-rw-r--r-- | catalog-ui/src/app/models/property-fe-model.ts | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/catalog-ui/src/app/models/property-fe-model.ts b/catalog-ui/src/app/models/property-fe-model.ts deleted file mode 100644 index f83d6d6b51..0000000000 --- a/catalog-ui/src/app/models/property-fe-model.ts +++ /dev/null @@ -1,78 +0,0 @@ -import {SchemaPropertyGroupModel, SchemaProperty} from './aschema-property'; -import { PROPERTY_DATA } from 'app/utils'; -import { FilterPropertiesAssignmentData, PropertyBEModel } from 'app/models'; - -export class PropertyFEModel extends PropertyBEModel { - public static filterData:FilterPropertiesAssignmentData; - childrenProperties: Array<PropertyFEModel>; - expandedChildPropertyId: string; - isAllChildrenLevelsCalculated: boolean; - isDataType: boolean; - isDisabled: boolean; - isSelected: boolean; - isSimpleType: boolean; - parent: PropertyFEModel; - treeNodeId: string; - valueObjectRef: any; - private _derivedFromSimpleTypeName:string; - get derivedFromSimpleTypeName():string { - return this._derivedFromSimpleTypeName; - } - set derivedFromSimpleTypeName(derivedFromSimpleTypeName:string) { - this._derivedFromSimpleTypeName = derivedFromSimpleTypeName; - } - - constructor(property?: PropertyBEModel); - constructor(name: string, type: string, treeNodeId: string, parent: PropertyFEModel, valueObjectRef: any, schema?: SchemaPropertyGroupModel); - constructor(nameOrPropertyObj?: string | PropertyBEModel, type?: string, treeNodeId?: string, parent?: PropertyFEModel, valueObjectRef?: any, schema?: SchemaPropertyGroupModel) { - - super(typeof nameOrPropertyObj === 'string' ? null : nameOrPropertyObj); - - if (typeof nameOrPropertyObj === 'string') { - this.name = nameOrPropertyObj; - this.type = type; - this.treeNodeId = treeNodeId; - this.parent = parent; - this.valueObjectRef = valueObjectRef; - this.value = this.value || this.defaultValue; - if(schema){ - this.schema = new SchemaPropertyGroupModel(new SchemaProperty(schema.property)); - } - } - this.isSimpleType = PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.type) > -1; - this.isDataType = PROPERTY_DATA.TYPES.indexOf(this.type) == -1; - this.setNonDeclared(); - } - - - public setNonDeclared = (): void => { - this.isSelected = false; - this.isDisabled = false; - } - - public setAsDeclared = (): void => { - this.isSelected = true; - this.isDisabled = true; - } - - //For expand-collapse functionality - public updateExpandedChildPropertyId = (childPropertyId: string): void => { - this.expandedChildPropertyId = (this.expandedChildPropertyId == childPropertyId) ? '' : childPropertyId; - } - - public convertToServerObject: Function = (): any => { //TODO: Idan, Rachel, Nechama: Decide what we need to do here - // let serverObject = {}; - // let mapData = { - // 'type': this.type, - // 'required': this.required || false, - // 'defaultValue': this.defaultValue != '' && this.defaultValue != '[]' && this.defaultValue != '{}' ? this.defaultValue : null, - // 'description': this.description, - // 'isPassword': this.password || false, - // 'schema': this.schema, - // 'name': this.name - // }; - // serverObject[this.name] = mapData; - - //return JSON.stringify(serverObject); - }; -} |