1 package org.openecomp.sdcrests.vsp.rest;
3 import io.swagger.annotations.Api;
4 import io.swagger.annotations.ApiOperation;
5 import io.swagger.annotations.ApiParam;
6 import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentDependencyModel;
7 import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentDependencyResponseDto;
8 import org.springframework.validation.annotation.Validated;
10 import javax.validation.Valid;
11 import javax.validation.constraints.NotNull;
13 import javax.ws.rs.core.MediaType;
14 import javax.ws.rs.core.Response;
16 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
17 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
19 @Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/component-dependencies")
20 @Produces(MediaType.APPLICATION_JSON)
21 @Consumes(MediaType.APPLICATION_JSON)
22 @Api(value = "Vendor Software Product Component Dependencies")
24 public interface ComponentDependencies extends VspEntities {
28 @ApiOperation(value = "Create a vendor software product component dependency")
29 Response create(@Valid ComponentDependencyModel request,
30 @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
31 @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
32 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
37 @ApiOperation(value = "Get component dependencies for vendor software product",
38 response = ComponentDependencyResponseDto.class,
39 responseContainer = "List")
40 Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
41 @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
43 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
47 @Path("/{dependencyId}")
48 @ApiOperation(value = "Delete component dependency for vendor software product")
49 Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
50 @ApiParam(value = "Vendor software product version Id")
51 @PathParam("versionId") String versionId,
52 @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
53 ("dependencyId") String dependencyId,
54 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
58 @Path("/{dependencyId}")
59 @ApiOperation(value = "Update component dependency for vendor software product")
60 Response update(@Valid ComponentDependencyModel request,
61 @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
62 @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
64 @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
65 ("dependencyId") String dependencyId,
66 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
70 @Path("/{dependencyId}")
71 @ApiOperation(value = "Get component dependency for vendor software product",
72 response = ComponentDependencyResponseDto.class)
73 Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
74 @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
75 @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
76 ("dependencyId") String dependencyId,
77 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)