* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2021 Nokia
+ * ================================================================================
* 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
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
-
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
private Set<HeatStructureTree> helm;
public HeatStructureTree() {
+ heat = new TreeSet<>();
}
public HeatStructureTree(String fileName, boolean isBase) {
+ this();
this.isBase = isBase;
this.fileName = fileName;
}
* @return the heat structure tree by name
*/
public static HeatStructureTree getHeatStructureTreeByName(Set<HeatStructureTree> filesSet,
- String filename) {
+ String filename) {
for (HeatStructureTree heatStructureTree : filesSet) {
if (heatStructureTree.getFileName().equals(filename)) {
return heatStructureTree;
this.other.add(other);
}
- public void addToHelmList(HeatStructureTree helm){
+ public void addToHelmList(HeatStructureTree helm) {
if (this.helm == null) {
this.helm = new TreeSet<>();
}
*/
public void removeFromVolumeOrNetwork(String fileNameToRemove, FileData.Type type) {
Set<HeatStructureTree> volumeOrNetworkSet =
- type.equals(FileData.Type.HEAT_VOL) ? this.volume : this.network;
+ type.equals(FileData.Type.HEAT_VOL) ? this.volume : this.network;
HeatStructureTree toRemove = getHeatStructureTreeByName(volumeOrNetworkSet, fileNameToRemove);
volumeOrNetworkSet.remove(toRemove);
result1 = 31 * result1 + (nested != null ? nested.hashCode() : 0);
result1 = 31 * result1 + (errors != null ? errors.hashCode() : 0);
-
return result1;
}
HeatStructureTree heatStructureTree = (HeatStructureTree) other;
if (fileName != null ? !fileName.equals(heatStructureTree.fileName)
- : heatStructureTree.fileName != null) {
+ : heatStructureTree.fileName != null) {
return false;
}
if (env != null ? !env.equals(heatStructureTree.env) : heatStructureTree.env != null) {
return false;
}
if (volume != null ? !volume.equals(heatStructureTree.volume)
- : heatStructureTree.volume != null) {
+ : heatStructureTree.volume != null) {
return false;
}
if (network != null ? !network.equals(heatStructureTree.network)
- : heatStructureTree.network != null) {
+ : heatStructureTree.network != null) {
return false;
}
if (artifacts != null ? !artifacts.equals(heatStructureTree.artifacts)
- : heatStructureTree.artifacts != null) {
+ : heatStructureTree.artifacts != null) {
return false;
}
if (nested != null ? !nested.equals(heatStructureTree.nested)
- : heatStructureTree.nested != null) {
+ : heatStructureTree.nested != null) {
return false;
}
{
+ "heat": [],
"nested": [
{
"fileName": "TOSCA-Metadata",
+ "heat": [],
"nested": [
{
- "fileName": "TOSCA.meta"
+ "fileName": "TOSCA.meta",
+ "heat": []
}
]
},
{
- "fileName": "MainServiceTemplate.yaml"
+ "fileName": "MainServiceTemplate.yaml",
+ "heat": []
},
{
"fileName": "Definitions",
+ "heat": [],
"nested": [
{
- "fileName": "GlobalSubstitutionTypesServiceTemplate.yaml"
+ "fileName": "GlobalSubstitutionTypesServiceTemplate.yaml",
+ "heat": []
}
]
},
{
"fileName": "Artifacts",
+ "heat": [],
"nested": [
{
"fileName": "OTHER",
+ "heat": [],
"nested": [
{
- "fileName": "clearWaterIMSOTHER.zip"
+ "fileName": "clearWaterIMSOTHER.zip",
+ "heat": []
}
]
},
{
"fileName": "Deployment",
+ "heat": [],
"nested": [
{
"fileName": "OTHER",
+ "heat": [],
"nested": [
{
- "fileName": "clearWaterIMSOTHERDEPLOYMENT.zip"
+ "fileName": "clearWaterIMSOTHERDEPLOYMENT.zip",
+ "heat": []
}
]
}
]
}
]
-}
\ No newline at end of file
+}
{
+ "heat": [],
"nested": [
{
"fileName": "TOSCA-Metadata",
+ "heat": [],
"nested": [
{
- "fileName": "TOSCA.meta"
+ "fileName": "TOSCA.meta",
+ "heat": []
}
]
},
{
- "fileName": "MainServiceTemplate.yaml"
+ "fileName": "MainServiceTemplate.yaml",
+ "heat": []
},
{
"fileName": "Definitions",
+ "heat": [],
"nested": [
{
- "fileName": "GlobalSubstitutionTypesServiceTemplate.yaml"
+ "fileName": "GlobalSubstitutionTypesServiceTemplate.yaml",
+ "heat": []
}
]
},
{
"fileName": "Artifacts",
+ "heat": [],
"nested": [
{
"fileName": "OTHER",
+ "heat": [],
"nested": [
{
- "fileName": "clearWaterIMSOTHERDEPLOYMENT.zip"
+ "fileName": "clearWaterIMSOTHERDEPLOYMENT.zip",
+ "heat": []
},
{
- "fileName": "clearWaterIMSOTHER.zip"
+ "fileName": "clearWaterIMSOTHER.zip",
+ "heat": []
}
]
}
]
}
]
-}
\ No newline at end of file
+}