5ce5eec43e2585fcd608aa5785b2cc188b71bf3c
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / aaiTree / Node.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.vid.model.aaiTree;
22
23 import org.onap.vid.aai.util.AAITreeConverter;
24 import org.onap.vid.mso.model.ModelInfo;
25
26 public class Node extends AbstractNode {
27     private String instanceType;
28
29     private String provStatus;
30     private Boolean inMaint;
31
32     private String uuid;
33     private String originalName;
34
35     private String legacyRegion;
36     private String lineOfBusiness;
37     private String platformName;
38
39     private final String trackById;
40
41     public Node(AAITreeNode aaiNode, AAITreeConverter.ModelType modelType) {
42         super();
43         this.instanceId = aaiNode.getId();
44         this.instanceName = aaiNode.getName();
45         this.orchStatus = aaiNode.getOrchestrationStatus();
46         this.provStatus = aaiNode.getProvStatus();
47         this.inMaint = aaiNode.getInMaint();
48         this.uuid = aaiNode.getModelVersionId();
49         this.originalName = aaiNode.getModelCustomizationName();
50         this.trackById = aaiNode.getUniqueNodeKey();
51
52         ModelInfo nodeModelInfo = new ModelInfo();
53         nodeModelInfo.setModelType(modelType.name());
54         nodeModelInfo.setModelName(aaiNode.getModelName());
55         nodeModelInfo.setModelVersion(aaiNode.getModelVersion());
56         nodeModelInfo.setModelVersionId(aaiNode.getModelVersionId());
57         nodeModelInfo.setModelInvariantId(aaiNode.getModelInvariantId());
58         nodeModelInfo.setModelCustomizationId(aaiNode.getModelCustomizationId());
59         nodeModelInfo.setModelCustomizationName(aaiNode.getModelCustomizationName());
60
61         this.modelInfo = nodeModelInfo;
62     }
63
64     public void setInstanceName(String instanceName) {
65         this.instanceName = instanceName;
66     }
67
68     public void setInstanceId(String instanceId) {
69         this.instanceId = instanceId;
70     }
71
72     public String getInstanceType() {
73         return instanceType;
74     }
75
76     public void setInstanceType(String instanceType) {
77         this.instanceType = instanceType;
78     }
79
80     public void setOrchStatus(String orchStatus) {
81         this.orchStatus = orchStatus;
82     }
83
84     public String getProvStatus() {
85         return provStatus;
86     }
87
88     public void setProvStatus(String provStatus) {
89         this.provStatus = provStatus;
90     }
91
92     public Boolean getInMaint() {
93         return inMaint;
94     }
95
96     public void setInMaint(Boolean inMaint) {
97         this.inMaint = inMaint;
98     }
99
100     public void setModelInfo(ModelInfo modelInfo) {
101         this.modelInfo = modelInfo;
102     }
103
104     public String getUuid() {
105         return uuid;
106     }
107
108     public void setUuid(String uuid) {
109         this.uuid = uuid;
110     }
111
112     public String getOriginalName() {
113         return originalName;
114     }
115
116     public void setOriginalName(String originalName) {
117         this.originalName = originalName;
118     }
119
120     public void setProductFamilyId(String productFamilyId) {
121         this.productFamilyId = productFamilyId;
122     }
123
124     public void setLcpCloudRegionId(String lcpCloudRegionId) {
125         this.lcpCloudRegionId = lcpCloudRegionId;
126     }
127
128     public String getLegacyRegion() {
129         return legacyRegion;
130     }
131
132     public void setLegacyRegion(String legacyRegion) {
133         this.legacyRegion = legacyRegion;
134     }
135
136     public void setTenantId(String tenantId) {
137         this.tenantId = tenantId;
138     }
139
140     public String getLineOfBusiness() {
141         return lineOfBusiness;
142     }
143
144     public void setLineOfBusiness(String lineOfBusiness) {
145         this.lineOfBusiness = lineOfBusiness;
146     }
147
148     public String getPlatformName() {
149         return platformName;
150     }
151
152     public void setPlatformName(String platformName) {
153         this.platformName = platformName;
154     }
155
156     public String getTrackById() {
157         return trackById;
158     }
159 }