From ce113865c2fafa11ef20f56201e2004013bc1169 Mon Sep 17 00:00:00 2001 From: talio Date: Mon, 13 Nov 2017 11:39:22 +0200 Subject: forwarder healer add healer for forwarder capability Issue-Id : SDC-653 Change-Id: Ic653cf22b4d7c4e22d34b15cac56d91f55ecd6c4 Signed-off-by: talio --- .../sdc/tosca/datatypes/ToscaServiceModel.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java') diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java index 722c286f50..4512fce159 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java @@ -20,12 +20,14 @@ package org.openecomp.sdc.tosca.datatypes; +import org.apache.commons.collections.MapUtils; import org.openecomp.core.utilities.file.FileContentHandler; import org.openecomp.sdc.datatypes.model.AsdcModel; import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; import org.openecomp.sdc.tosca.services.DataModelUtil; import java.util.Collections; +import java.util.HashMap; import java.util.Map; /** @@ -87,6 +89,15 @@ public class ToscaServiceModel implements AsdcModel { return Collections.unmodifiableMap(serviceTemplates); } + public void addServiceTemplate(String serviceTemplateName, + ServiceTemplate serviceTemplate) { + if(MapUtils.isEmpty(serviceTemplates)){ + serviceTemplates = new HashMap<>(); + } + + serviceTemplates.put(serviceTemplateName, serviceTemplate); + } + /** * Sets service templates. * @@ -123,12 +134,4 @@ public class ToscaServiceModel implements AsdcModel { public static ToscaServiceModel getClonedServiceModel(ToscaServiceModel toscaServiceModel) { return ToscaServiceModel.class.cast(DataModelUtil.getClonedObject(toscaServiceModel)); } - - public FileContentHandler getExternalFiles() { - return externalFiles; - } - - public void setExternalFiles(FileContentHandler externalFiles) { - this.externalFiles = externalFiles; - } } -- cgit 1.2.3-korg