From 280f8015d06af1f41a3ef12e8300801c7a5e0d54 Mon Sep 17 00:00:00 2001 From: AviZi Date: Fri, 9 Jun 2017 02:39:56 +0300 Subject: [SDC-29] Amdocs OnBoard 1707 initial commit. Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi --- .../sdcrests/vendorlicense/rest/FeatureGroups.java | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java index f5ad973cb0..9a72a59070 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java @@ -20,9 +20,6 @@ package org.openecomp.sdcrests.vendorlicense.rest; -import static org.openecomp.sdcrests.common.RestConstants.USER_HEADER_PARAM; -import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG; - import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -49,7 +46,11 @@ import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -@Path("/v1.0/vendor-license-models/{vlmId}/feature-groups") +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}/feature-groups") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Api(value = "Vendor License Model - Feature Groups") @@ -63,9 +64,8 @@ public interface FeatureGroups { responseContainer = "List") Response listFeatureGroups( @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId, - @Pattern(regexp = Version.VERSION_REGEX, message = Version.VERSION_STRING_VIOLATION_MSG) - @QueryParam("version") String version, - @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_HEADER_PARAM) String user); + @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId, + @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); @POST @Path("/") @@ -73,8 +73,9 @@ public interface FeatureGroups { Response createFeatureGroup(@Valid FeatureGroupRequestDto request, @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId, + @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId, @NotNull(message = USER_MISSING_ERROR_MSG) - @HeaderParam(USER_HEADER_PARAM) String user); + @HeaderParam(USER_ID_HEADER_PARAM) String user); @PUT @Path("/{featureGroupId}") @@ -82,9 +83,10 @@ public interface FeatureGroups { Response updateFeatureGroup(@Valid FeatureGroupUpdateRequestDto request, @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId, + @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId, @PathParam("featureGroupId") String featureGroupId, @NotNull(message = USER_MISSING_ERROR_MSG) - @HeaderParam(USER_HEADER_PARAM) String user); + @HeaderParam(USER_ID_HEADER_PARAM) String user); @GET @Path("/{featureGroupId}") @@ -92,17 +94,17 @@ public interface FeatureGroups { response = FeatureGroupModelDto.class) Response getFeatureGroup( @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId, - @Pattern(regexp = Version.VERSION_REGEX, message = Version.VERSION_STRING_VIOLATION_MSG) - @QueryParam("version") String version, + @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId, @PathParam("featureGroupId") String featureGroupId, - @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_HEADER_PARAM) String user); + @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); @DELETE @Path("/{featureGroupId}") @ApiOperation(value = "Delete vendor feature group") Response deleteFeatureGroup( @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId, + @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId, @PathParam("featureGroupId") String featureGroupId, - @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_HEADER_PARAM) String user); + @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); } -- cgit 1.2.3-korg