summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java18
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java3
2 files changed, 20 insertions, 1 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 0fcaafa1c2..722c286f50 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
@@ -33,6 +33,7 @@ import java.util.Map;
*/
public class ToscaServiceModel implements AsdcModel {
private FileContentHandler artifactFiles;
+ private FileContentHandler externalFiles;
private Map<String, ServiceTemplate> serviceTemplates;
private String entryDefinitionServiceTemplate;
@@ -54,6 +55,15 @@ public class ToscaServiceModel implements AsdcModel {
this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
}
+ public ToscaServiceModel(FileContentHandler artifactFiles,
+ FileContentHandler externalFiles,
+ Map<String, ServiceTemplate> serviceTemplates,
+ String entryDefinitionServiceTemplate) {
+ this.artifactFiles = artifactFiles;
+ this.externalFiles = externalFiles;
+ this.serviceTemplates = serviceTemplates;
+ this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
+ }
/**
* Gets artifact files.
@@ -113,4 +123,12 @@ 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;
+ }
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
index dc2ed6c76b..45e6c3deef 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
@@ -492,7 +492,8 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
toscaServiceModel.getServiceTemplates().get(fetchFileNameForImport(importFile,
serviceTemplate.getMetadata() == null ? null
: serviceTemplate.getMetadata().get("filename")));
- if (filesScanned.contains(ToscaUtil.getServiceTemplateFileName(template))) {
+ if (Objects.isNull(template) ||
+ filesScanned.contains(ToscaUtil.getServiceTemplateFileName(template))) {
continue;
} else {
filesScanned.add(ToscaUtil.getServiceTemplateFileName(template));