221baaebd667c049efd21fb1a8e4937db488fdca
[osm/riftware.git] /
1 /*
2  *    Copyright 2016 RIFT.IO Inc
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16
17 /*
18  * STANDARD_RIFT_IO_COPYRIGHT
19  */
20 /**
21  * Created by onvelocity on 11/23/15.
22  */
23
24 'use strict';
25
26 export default class ClassifierConnectionPointRef {
27
28         constructor(parent) {
29                 this.parent = parent;
30         }
31
32         get key() {
33                 return this.parent.model['member-vnf-index-ref'] + '/' + this.parent.model['vnfd-connection-point-ref'];
34         }
35
36         get title() {
37                 return this.vnfdConnectionPointName;
38         }
39
40         get vnfdId() {
41                 return this.parent.model['vnfd-id-ref'];
42         }
43
44         set vnfdId(id) {
45                 return this.parent.model['vnfd-id-ref'] = id;
46         }
47
48         get vnfdIndex() {
49                 return this.parent.model['member-vnf-index-ref'];
50         }
51
52         set vnfdIndex(index) {
53                 return this.parent.model['member-vnf-index-ref'] = index;
54         }
55
56         get vnfdConnectionPointName() {
57                 return this.parent.model['vnfd-connection-point-ref'];
58         }
59
60         set vnfdConnectionPointName(name) {
61                 return this.parent.model['vnfd-connection-point-ref'] = name;
62         }
63
64         get cpNumber() {
65                 return this.parent.uiState.cpNumber;
66         }
67
68         set cpNumber(n) {
69                 this.parent.uiState.cpNumber = n;
70         }
71
72         get vnfdRef() {
73                 return this.parent.uiState.vnfdRef;
74         }
75
76         set vnfdRef(n) {
77                 this.parent.uiState.vnfdRef = n;
78         }
79
80         remove() {
81                 return this.parent.removeVnfdConnectionPointRef();
82         }
83
84 }