9061734a899c833394c2eff4fca53beeedb222cb
[osm/riftware.git] /
1 /*
2  * STANDARD_RIFT_IO_COPYRIGHT
3  */
4 /**
5  * Created by onvelocity on 11/23/15.
6  */
7
8 'use strict';
9
10 import Position from '../../graph/Position'
11 import DescriptorModel from '../DescriptorModel'
12 import RspConnectionPointRef from './RspConnectionPointRef'
13 import VnfdConnectionPointRef from './VnfdConnectionPointRef'
14
15 /**
16  * A VirtualNetworkFunctionConnectionPoint is always a child of a VNFD. We use it to build VnfdConnectionPointRef instances. So convenience
17  * methods are add to access the fields needed to do that.
18  */
19 export default class ClassifierMatchAttributes extends DescriptorModel {
20
21         static get type() {
22                 return 'match-attributes';
23         }
24
25         static get className() {
26                 return 'ClassifierMatchAttributes';
27         }
28
29         static get qualifiedType() {
30                 return 'nsd.vnffgd.classifier.' + ClassifierMatchAttributes.type;
31         }
32
33         constructor(model, parent) {
34                 super(model, parent);
35                 this.type = ClassifierMatchAttributes.type;
36                 this.uiState['qualified-type'] = ClassifierMatchAttributes.qualifiedType;
37                 this.className = ClassifierMatchAttributes.className;
38                 this.position = new Position();
39         }
40
41         getFieldValue(name) {
42                 return this.model[name];
43         }
44
45         setFieldValue(name, value) {
46                 this.model[name] = value;
47         }
48
49         remove() {
50                 return this.parent.removeMatchAttributes(this);
51         }
52
53 }