aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2019-07-16 17:17:36 +0300
committerIttay Stern <ittay.stern@att.com>2019-07-30 06:01:44 +0300
commite601bbdc43bae9a08e2e10c5139a6f76b47860d7 (patch)
tree1913f0b369ead3f2ea5557e5649d8281eca9871c /vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
parent76c6ee4a697617ec4cdee2f3b48bc83136c858c5 (diff)
Implant vid-app-common org.onap.vid.job (main and test)
Issue-ID: VID-378 Change-Id: I41b0bdc2c4e3635f3f3319b1cd63cefc61912dfc Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java50
1 files changed, 32 insertions, 18 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
index 4b16b3122..f092c9ae6 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,17 +20,19 @@
package org.onap.vid.model.aaiTree;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+import org.onap.vid.mso.model.CloudConfiguration;
import java.util.*;
public class AAITreeNode {
- private String type;
- private int uniqueNumber;
+ private NodeType type;
private String orchestrationStatus;
private String provStatus;
- private Boolean inMaint = null;
+ private boolean inMaint;
private String modelVersionId;
private String modelCustomizationId;
private String modelInvariantId;
@@ -41,25 +43,19 @@ public class AAITreeNode {
private String modelCustomizationName;
private final List<AAITreeNode> children = Collections.synchronizedList(new LinkedList<>());
private Map<String, Object> additionalProperties = new HashMap<>();
+ private CloudConfiguration cloudConfiguration;
+ private RelationshipList relationshipList;
private String keyInModel;
private AAITreeNode parent;
- public String getType() {
+ public NodeType getType() {
return type;
}
- public void setType(String type) {
+ public void setType(NodeType type) {
this.type = type;
}
- public int getUniqueNumber() {
- return uniqueNumber;
- }
-
- public void setUniqueNumber(int uniqueNumber) {
- this.uniqueNumber = uniqueNumber;
- }
-
public String getOrchestrationStatus() {
return orchestrationStatus;
}
@@ -76,11 +72,11 @@ public class AAITreeNode {
this.provStatus = provStatus;
}
- public Boolean getInMaint() {
+ public boolean getInMaint() {
return inMaint;
}
- public void setInMaint(Boolean inMaint) {
+ public void setInMaint(boolean inMaint) {
this.inMaint = inMaint;
}
@@ -169,7 +165,7 @@ public class AAITreeNode {
}
public String getUniqueNodeKey() {
- return getNodeKey() + ":" + String.format("%03d", this.uniqueNumber);
+ return this.id;
}
public void setKeyInModel(String keyInModel) {
@@ -180,6 +176,8 @@ public class AAITreeNode {
return keyInModel;
}
+ //prevent cyclic serialization of parent and children
+ @JsonIgnore
public AAITreeNode getParent() {
return parent;
}
@@ -188,6 +186,22 @@ public class AAITreeNode {
this.parent = parent;
}
+ public CloudConfiguration getCloudConfiguration() {
+ return cloudConfiguration;
+ }
+
+ public void setCloudConfiguration(CloudConfiguration cloudConfiguration) {
+ this.cloudConfiguration = cloudConfiguration;
+ }
+
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
public void addChildren(List<AAITreeNode> children) {
for (AAITreeNode child : children) {
child.setParent(this);