summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java2
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java11
2 files changed, 6 insertions, 7 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
index 1b07f681ac..870c4e762a 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/VendorSoftwareProductManager.java
@@ -44,7 +44,7 @@ public interface VendorSoftwareProductManager {
void deleteVsp(String vspId, Version version);
- ValidationResponse validate(String vspId, Version version) throws IOException;
+ ValidationResponse validate(VspDetails vspDetails) throws IOException;
Map<String, List<ErrorMessage>> compile(String vspId, Version version);
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
index df2e098be7..275aee646b 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
@@ -202,15 +202,14 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
}
@Override
- public ValidationResponse validate(String vspId, Version version) throws IOException {
- VspDetails vspDetails = getValidatedVsp(vspId, version);
+ public ValidationResponse validate(VspDetails vspDetails) throws IOException {
List<ErrorCode> vspErrors = new ArrayList<>(validateVspFields(vspDetails));
ValidationResponse validationResponse = new ValidationResponse();
if (Objects.nonNull(vspDetails.getOnboardingMethod())
&& OnboardingMethod.Manual.name().equals(vspDetails.getOnboardingMethod())) {
validateManualOnboardingMethod(vspDetails, validationResponse, vspErrors);
} else {
- validateOrchestrationTemplateCandidate(validationResponse, vspErrors, vspId, version);
+ validateOrchestrationTemplateCandidate(validationResponse, vspErrors, vspDetails.getId(), vspDetails.getVersion());
if (!validationResponse.isValid()) {
return validationResponse;
}
@@ -219,9 +218,9 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
vspErrors.addAll(validateMandatoryLicenseFields(vspDetails));
}
OrchestrationTemplateEntity orchestrationTemplate =
- orchestrationTemplateDao.get(vspId, version);
+ orchestrationTemplateDao.get(vspDetails.getId(), vspDetails.getVersion());
ToscaServiceModel serviceModel =
- serviceModelDao.getServiceModel(vspId, vspDetails.getVersion());
+ serviceModelDao.getServiceModel( vspDetails.getId(), vspDetails.getVersion());
if (isOrchestrationTemplateMissing(orchestrationTemplate)
|| isServiceModelMissing(serviceModel)) {
vspErrors.add(VendorSoftwareProductInvalidErrorBuilder
@@ -245,7 +244,7 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
}
Collection<ComponentDependencyModelEntity> componentDependencies =
- componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
+ componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspDetails.getId(), vspDetails.getVersion(), null));
if (validateComponentDependencies(componentDependencies)) {
vspErrors