1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
package org.openecomp.sdcrests.vendorlicense.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.openecomp.sdcrests.vendorlicense.types.LimitEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
@Path(
"/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-key-groups/{licenseKeyGroupId}/limits")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Api(value = "Vendor License Model - License Key Group Limits")
@Validated
public interface LicenseKeyGroupLimits {
@POST
@Path("/")
@ApiOperation(value = "Create vendor license key group limit")
Response createLimit(@Valid LimitRequestDto request,
@ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
@ApiParam(value = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
@ApiParam(value = "Vendor license model License Key Group Id")
@PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/")
@ApiOperation(value = "List vendor license key group limits",
response = LimitEntityDto.class,
responseContainer = "List")
Response listLimits(
@ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
@ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
@ApiParam(value = "Vendor license model License Key Group Id") @PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{limitId}")
@ApiOperation(value = "Update vendor license key group limit")
Response updateLimit(@Valid LimitRequestDto request,
@ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
@ApiParam(value = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
@ApiParam(value = "Vendor license model License Key Group Id")
@PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@PathParam("limitId") String limitId,
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{limitId}")
@ApiOperation(value = "Get vendor entitlement pool limit",
response = LimitEntityDto.class)
Response getLimit(
@ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
@ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
@ApiParam(value = "Vendor license model License Key Group") @PathParam
("licenseKeyGroupId") String entitlementPoolId,
@ApiParam(value = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{limitId}")
@ApiOperation(value = "Delete vendor license key group limit")
Response deleteLimit(
@ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
@ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
@ApiParam(value = "Vendor license model license key group Id") @PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@PathParam("limitId") String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
|