Identify SOL004 packages
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / impl / orchestration / csar / validation / ValidatorFactory.java
index 91d2705..d3ac455 100644 (file)
@@ -48,8 +48,8 @@ public class ValidatorFactory {
      */
     public Validator getValidator(final FileContentHandler fileContentHandler) throws IOException {
         final ETSIService etsiService = new ETSIServiceImpl(null);
-        if (!etsiService.isSol004WithToscaMetaDirectory(fileContentHandler)) {
-            return new ONAPCsarValidator();
+        if (!etsiService.hasEtsiSol261Metadata(fileContentHandler)) {
+            return etsiService.isEtsiPackage(fileContentHandler) ? new EtsiSol004Version251Validator() : new ONAPCsarValidator();
         }
         if (!etsiService.getHighestCompatibleSpecificationVersion(fileContentHandler).isLowerThan(ETSI_VERSION_2_7_1)) {
             if (etsiService.hasCnfEnhancements(fileContentHandler)) {