diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/composition/UnifiedSubstitutionData.java')
1 files changed, 19 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/composition/UnifiedSubstitutionData.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/composition/UnifiedSubstitutionData.java index 57f77a51e5..ae3d888736 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/composition/UnifiedSubstitutionData.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/composition/UnifiedSubstitutionData.java @@ -25,6 +25,8 @@ public class UnifiedSubstitutionData { new HashMap<>(); //Key - nested compute type, Value - list of nested files that the compute type is present private Map<String, Set<String>> handledNestedComputeTypesNestedFiles = new HashMap<>(); + //Key - new property id, Value - orig property value + private Map<String, Object> newParameterIdsToPropertiesFromOrigNodeTemplate = new HashMap<>(); //handled nested files private Set<String> handledNestedFiles = new HashSet<>(); @@ -142,4 +144,21 @@ public class UnifiedSubstitutionData { return this.handledNestedComputeTypesNestedFiles.get(computeType).size() == 1 ? 0: this.handledNestedComputeTypesNestedFiles.get(computeType).size() - 1; } + + public void addNewPropertyIdToNodeTemplate(String newPropertyId, + Object origPropertyValue){ + newParameterIdsToPropertiesFromOrigNodeTemplate.putIfAbsent(newPropertyId, origPropertyValue); + } + + public Optional<Object> getNewPropertyInputParam(String newPropertyId){ + if(!newParameterIdsToPropertiesFromOrigNodeTemplate.containsKey(newPropertyId)){ + return Optional.empty(); + } + + return Optional.of(newParameterIdsToPropertiesFromOrigNodeTemplate.get(newPropertyId)); + } + + public Map<String, Object> getAllNewPropertyInputParamIds(){ + return this.newParameterIdsToPropertiesFromOrigNodeTemplate; + } } |