summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index eb78bf0059..23930ed640 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -152,7 +152,9 @@ public class OrchestrationTemplateCandidateImpl implements OrchestrationTemplate
}
@Override
- public Response upload(final String vspId, final String versionId, final Attachment fileToUpload, final String user) {
+ public Response upload(String vspId, String versionId, final Attachment fileToUpload, final String user) {
+ vspId = ValidationUtils.sanitizeInputString(vspId);
+ versionId = ValidationUtils.sanitizeInputString(versionId);
final byte[] fileToUploadBytes;
final var filename = ValidationUtils.sanitizeInputString(fileToUpload.getDataHandler().getName());
ArtifactInfo artifactInfo = null;
@@ -193,8 +195,8 @@ public class OrchestrationTemplateCandidateImpl implements OrchestrationTemplate
return Response.ok(uploadFileResponseDto)
.build();
}
- final var version = new Version(ValidationUtils.sanitizeInputString(versionId));
- final var vspDetails = new VspDetails(ValidationUtils.sanitizeInputString(vspId), version);
+ final var version = new Version(versionId);
+ final var vspDetails = vendorSoftwareProductManager.getVsp(vspId, version);
return processOnboardPackage(onboardPackageInfo, vspDetails, errorMessages);
}