Obtain upload lock before uploading
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / vendor-software-products-rest / vendor-software-products-rest-services / src / main / java / org / openecomp / sdcrests / vsp / rest / OrchestrationTemplateCandidateUploadManagerController.java
index 971a1c4..19c27e4 100644 (file)
@@ -31,6 +31,7 @@ import javax.validation.constraints.NotNull;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
@@ -62,4 +63,18 @@ public interface OrchestrationTemplateCandidateUploadManagerController extends V
                              @Parameter(description = "Vendor Software Product version id") @PathParam("versionId") String versionId,
                              @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
+    /**
+     * Creates the upload lock, setting the status to upload in progress.
+     *
+     * @param vspId     the vsp id
+     * @param versionId the vsp version id
+     * @param user      the username accessing the API
+     * @return if successful, an OK response with the created VspUploadStatus information
+     */
+    @POST
+    @Path("/")
+    Response createUploadLock(@Parameter(description = "Vendor Software Product id") @PathParam("vspId") String vspId,
+                              @Parameter(description = "Vendor Software Product version id") @PathParam("versionId") String versionId,
+                              @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
+
 }