summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-heat-lib/src/main/java/org
diff options
context:
space:
mode:
authoreleonorali <eleonoral@amdocs.com>2018-07-11 20:15:47 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-07-15 14:02:15 +0000
commitdece2c1d9149fce088669baa9621e7e4a6ce093a (patch)
treed93c6cc54ac115495cc9397cb347b8aa5a1af5f0 /openecomp-be/lib/openecomp-heat-lib/src/main/java/org
parent874bd9ed420ce8c281450e730d6d1ed3e3dc688e (diff)
Nested input params appears in MainServiceTemplate
When Nested heat belongs to Volume HEAT and Volume Heat was associated to main HEAT (parent) input parameters came from such nested were appear in MainServiceTemplate.yaml (TOSCA) Also these parameters had annotation in nestedServiceTemplate.yaml Change-Id: I46fff53de502c7ec48b6e4c26087121be89dd0a1 Issue-ID: SDC-1498 Signed-off-by: eleonorali <eleonoral@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-heat-lib/src/main/java/org')
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java122
1 files changed, 65 insertions, 57 deletions
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
index 81bf2fa5a9..2bc549c058 100644
--- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
@@ -22,75 +22,80 @@ package org.openecomp.sdc.heat.datatypes.manifest;
import org.apache.commons.collections4.CollectionUtils;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
import java.util.function.Predicate;
public class FileData {
- protected static final Set<Type> heatFileTypes =
- new HashSet<>(Arrays.asList(Type.HEAT, Type.HEAT_NET, Type.HEAT_VOL));
- private Boolean isBase;
- private String file;
- private Type type;
- private List<FileData> data;
+ protected static final Set<Type> heatFileTypes =
+ new HashSet<>(Arrays.asList(Type.HEAT, Type.HEAT_NET, Type.HEAT_VOL));
+ private Boolean isBase;
+ private String parentFile;
+ private String file;
+ private Type type;
+ private List<FileData> data;
- public static Predicate<FileData> buildFileDataPredicateByType(Type... types) {
- return fileData -> Arrays.asList(types).contains(fileData.getType());
- }
+ public static Predicate<FileData> buildFileDataPredicateByType(Type... types) {
+ return fileData -> Arrays.asList(types).contains(fileData.getType());
+ }
- public static boolean isHeatFile(Type type) {
+ public static boolean isHeatFile(Type type) {
return heatFileTypes.contains(type);
}
- public Boolean getBase() {
- return isBase;
- }
+ public Boolean getBase() {
+ return isBase;
+ }
- public void setBase(Boolean base) {
- isBase = base;
- }
+ public void setBase(Boolean base) {
+ isBase = base;
+ }
- public String getFile() {
- return file;
- }
+ public String getFile() {
+ return file;
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public String getParentFile() {
+ return parentFile;
+ }
- public void setFile(String file) {
- this.file = file;
+ public void setParentFile(String parentFile) {
+ this.parentFile = parentFile;
}
- public Type getType() {
+ public Type getType() {
return type;
}
- public void setType(Type type) {
+ public void setType(Type type) {
this.type = type;
}
- public List<FileData> getData() {
- return data;
- }
+ public List<FileData> getData() {
+ return data;
+ }
- public void setData(List<FileData> data) {
- this.data = data;
- }
+ public void setData(List<FileData> data) {
+ this.data = data;
+ }
- /**
- * Add file data.
- *
- * @param data the data
- */
- public void addFileData(FileData data) {
- if (CollectionUtils.isEmpty(this.data)) {
- this.data = new ArrayList<>();
+ /**
+ * Add file data.
+ *
+ * @param data the data
+ */
+ public void addFileData(FileData data) {
+ if (CollectionUtils.isEmpty(this.data)) {
+ this.data = new ArrayList<>();
+ }
+ this.data.add(data);
}
- this.data.add(data);
- }
- public enum Type {
+ public enum Type {
HEAT("HEAT"),
HEAT_ENV("HEAT_ENV"),
@@ -108,20 +113,23 @@ public class FileData {
VF_LICENSE("VF_LICENSE"),
OTHER("OTHER");
- private String displayName;
+ private String displayName;
- Type(String displayName) {
- this.displayName = displayName;
- }
+ Type(String displayName) {
+ this.displayName = displayName;
+ }
- public String getDisplayName() {
- return displayName;
- }
+ public String getDisplayName() {
+ return displayName;
+ }
- public static boolean isArtifact(Type fileType)
- {
- return !Arrays.asList(HEAT,HEAT_ENV, HEAT_VOL).contains(fileType);
- }
+ public static boolean isArtifact(Type fileType) {
+ return !Arrays.asList(HEAT,HEAT_ENV, HEAT_VOL).contains(fileType);
+ }
- }
+ public static boolean canBeAssociated(Type fileType)
+ {
+ return HEAT_VOL == fileType;
+ }
+ }
}