summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src')
-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;
- }
}