aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2017-11-13 11:39:22 +0200
committertalio <tali.orenbach@amdocs.com>2017-11-13 13:59:56 +0200
commitce113865c2fafa11ef20f56201e2004013bc1169 (patch)
tree0d7ee169e385d493c016f4f247dadd9f4ca4bc43 /openecomp-be/lib/openecomp-tosca-lib
parentce889adae3f91a8296bf41ce5804a51483242b2a (diff)
forwarder healer
add healer for forwarder capability Issue-Id : SDC-653 Change-Id: Ic653cf22b4d7c4e22d34b15cac56d91f55ecd6c4 Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java19
1 files changed, 11 insertions, 8 deletions
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;
- }
}