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