Complete review management

feature/appm-store/pbac
lasanthaDLPDS 6 years ago
parent 3e16ec96b9
commit 4562432509

@ -110,30 +110,30 @@ public interface ReviewManagementAPI {
value = { value = {
@ApiResponse( @ApiResponse(
code = 200, code = 200,
message = "OK. \n Successfully retrieved comments.", message = "OK. \n Successfully retrieved reviews.",
response = PaginationResult.class, response = PaginationResult.class,
responseContainer = "PaginationResult"), responseContainer = "PaginationResult"),
@ApiResponse( @ApiResponse(
code = 500, code = 500,
message = "Internal Server Error. \n Error occurred while getting the comment list.", message = "Internal Server Error. \n Error occurred while getting the review list.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
Response getAllReviews( Response getAllReviews(
@ApiParam( @ApiParam(
name="uuid", name="uuid",
value="uuid of the released version of application.", value="uuid of the application release.",
required = true) required = true)
@PathParam("uuid") @PathParam("uuid")
String uuid, String uuid,
@ApiParam( @ApiParam(
name="offSet", name="offSet",
value="Starting comment number.",defaultValue = "0") value="Starting review number.",defaultValue = "0")
@QueryParam("offSet") @QueryParam("offSet")
int offSet, int offSet,
@ApiParam( @ApiParam(
name="limit", name="limit",
value = "Limit of paginated comments",defaultValue = "20") value = "Limit of paginated reviews",defaultValue = "20")
@QueryParam("limit") @QueryParam("limit")
int limit); int limit);
@ -202,16 +202,12 @@ public interface ReviewManagementAPI {
@ApiResponses( @ApiResponses(
value = { value = {
@ApiResponse( @ApiResponse(
code = 201, code = 200,
message = "OK. \n Successfully updated review.", message = "OK. \n Successfully updated review.",
response = Review.class), response = Review.class),
@ApiResponse( @ApiResponse(
code = 400, code = 400,
message = "Bad Request. \n Invalid request or validation error."), message = "Bad Request. \n Invalid request or validation error."),
@ApiResponse(
code = 404,
message = "Not Found. \n No activity found with the given ID.",
response = ErrorResponse.class),
@ApiResponse( @ApiResponse(
code = 500, code = 500,
message = "Internal Server Error. \n Error occurred while updating the new review.", message = "Internal Server Error. \n Error occurred while updating the new review.",
@ -247,7 +243,7 @@ public interface ReviewManagementAPI {
tags = "Store Management", tags = "Store Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:store:remove") @ExtensionProperty(name = SCOPE, value = "perm:app:review:update")
}) })
} }
) )
@ -256,14 +252,14 @@ public interface ReviewManagementAPI {
value = { value = {
@ApiResponse( @ApiResponse(
code = 200, code = 200,
message = "OK. \n Successfully deleted the comment"), message = "OK. \n Successfully deleted the review"),
@ApiResponse( @ApiResponse(
code = 404, code = 404,
message = "Not Found. \n No activity found with the given ID.", message = "Not Found. \n No activity found with the given ID.",
response = ErrorResponse.class), response = ErrorResponse.class),
@ApiResponse( @ApiResponse(
code = 500, code = 500,
message = "Internal Server Error. \n Error occurred while deleting the comment.", message = "Internal Server Error. \n Error occurred while deleting the review.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@ -280,17 +276,17 @@ public interface ReviewManagementAPI {
@PathParam("reviewId") int reviewId); @PathParam("reviewId") int reviewId);
@GET @GET
@Path("/{uuid}/{stars}") @Path("/{uuid}/rating")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApiOperation( @ApiOperation(
produces = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON,
httpMethod = "GET", httpMethod = "GET",
value = "get stars", value = "get ratings",
notes = "Get all stars", notes = "Get all ratings",
tags = "Store Management", tags = "Store Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:stars:get") @ExtensionProperty(name = SCOPE, value = "perm:app:review:view")
}) })
} }
) )
@ -299,12 +295,12 @@ public interface ReviewManagementAPI {
value = { value = {
@ApiResponse( @ApiResponse(
code = 200, code = 200,
message = "OK. \n Successfully retrieved stars.", message = "OK. \n Successfully retrieved ratings.",
response = List.class, response = List.class,
responseContainer = "List"), responseContainer = "List"),
@ApiResponse( @ApiResponse(
code = 500, code = 500,
message = "Internal Server Error. \n Error occurred while getting the stars", message = "Internal Server Error. \n Error occurred while getting ratings",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })

Loading…
Cancel
Save