Add collaboration feature
[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 / VendorSoftwareProducts.java
index 3ead86d..d848d41 100644 (file)
@@ -23,13 +23,28 @@ package org.openecomp.sdcrests.vsp.rest;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-import org.openecomp.sdcrests.vendorsoftwareproducts.types.*;
+import org.openecomp.sdcrests.item.types.ItemCreationDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.PackageInfoDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.VersionSoftwareProductActionRequestDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspComputeDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspRequestDto;
 import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.IsValidJson;
 import org.springframework.validation.annotation.Validated;
 
 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
-import javax.ws.rs.*;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.io.File;
@@ -48,8 +63,8 @@ public interface VendorSoftwareProducts extends VspEntities {
   @POST
   @Path("/")
   @ApiOperation(value = "Create a new vendor software product",
-      response = VspCreationDto.class)
-  Response createVsp(@Valid VspDescriptionDto vspDescriptionDto,
+      response = ItemCreationDto.class)
+  Response createVsp(@Valid VspRequestDto vspRequestDto,
                      @NotNull(message = USER_MISSING_ERROR_MSG)
                      @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
@@ -58,13 +73,12 @@ public interface VendorSoftwareProducts extends VspEntities {
   @ApiOperation(value = "Get list of vendor software products and their description",
       responseContainer = "List")
   Response listVsps(@ApiParam(
-      value = "Currently supported values: 'Final' - only vendor software products with final "
+      value = "Currently supported values: 'Certified' - only vendor software products with final "
           + " version will be return - with their latest final version")
-                    @QueryParam("versionFilter") String versionFilter,
+                    @QueryParam("versionFilter") String versionStatus,
                     @NotNull(message = USER_MISSING_ERROR_MSG)
                     @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
-
   @GET
   @Path("/{vspId}/versions/{versionId}")
   @ApiOperation(value = "Get details of a vendor software product")
@@ -127,9 +141,9 @@ public interface VendorSoftwareProducts extends VspEntities {
           + "Checkin: Unlocks it and activates the edited version to all users.| "
           + "Submit: Finalize its active version.|"
           + "Create_Package: Creates a CSAR zip file.|")
-  Response actOnVendorSoftwareProduct(@PathParam("vspId") String vspId,
+  Response actOnVendorSoftwareProduct(VersionSoftwareProductActionRequestDto request,
+                                      @PathParam("vspId") String vspId,
                                       @PathParam("versionId") String versionId,
-                                      VersionSoftwareProductActionRequestDto request,
                                       @NotNull(message = USER_MISSING_ERROR_MSG)
                                       @HeaderParam(USER_ID_HEADER_PARAM) String user)
       throws IOException;
@@ -141,7 +155,7 @@ public interface VendorSoftwareProducts extends VspEntities {
       notes = "Exports translated file to a zip file",
       response = File.class)
   Response getTranslatedFile(@PathParam("vspId") String vspId,
-                             @QueryParam("version") String version,
+                             @QueryParam("versionId") String versionId,
                              @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
   @GET
@@ -183,4 +197,14 @@ public interface VendorSoftwareProducts extends VspEntities {
                                      @NotNull(message = USER_MISSING_ERROR_MSG)
                                      @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
+  @GET
+  @Path("/{vspId}/versions/{versionId}/compute-flavors")
+  @ApiOperation(value = "Get list of vendor software product compute-flavors",
+      response = VspComputeDto.class,
+      responseContainer = "List")
+  Response listComputes(@ApiParam(value = "Vendor software product Id")
+                        @PathParam("vspId") String vspId,
+                        @PathParam("versionId") String versionId,
+                        @NotNull(message = USER_MISSING_ERROR_MSG)
+                        @HeaderParam(USER_ID_HEADER_PARAM) String user);
 }