@FrameworkRestController
@FrameworkMapping(value="/ratings",
produces={"application/json","application/xml"})
public class RatingEndpoint
extends BaseEndpoint
| Modifier and Type | Field and Description |
|---|---|
protected org.broadleafcommerce.profile.core.service.CustomerService |
customerService |
protected org.broadleafcommerce.core.rating.service.RatingService |
ratingService |
context, messageSource| Constructor and Description |
|---|
RatingEndpoint(org.broadleafcommerce.core.rating.service.RatingService ratingService,
org.broadleafcommerce.profile.core.service.CustomerService customerService) |
| Modifier and Type | Method and Description |
|---|---|
RatingSummaryWrapper |
getRatingsForItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String itemId,
String ratingType) |
RatingSummaryWrapper |
submitReviewForItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String itemId,
String ratingType,
ReviewDetailWrapper reviewDetailWrapper) |
getApplicationContext, getMessageSource, setApplicationContext, setMessageSourceprotected final org.broadleafcommerce.core.rating.service.RatingService ratingService
protected final org.broadleafcommerce.profile.core.service.CustomerService customerService
public RatingEndpoint(org.broadleafcommerce.core.rating.service.RatingService ratingService,
org.broadleafcommerce.profile.core.service.CustomerService customerService)
@FrameworkMapping(value="/{itemId}")
public RatingSummaryWrapper getRatingsForItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
@PathVariable(value="itemId")
String itemId,
@RequestParam(value="ratingType",required=false,defaultValue="PRODUCT")
String ratingType)
@FrameworkMapping(value="/{itemId}",
method=POST)
public RatingSummaryWrapper submitReviewForItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
@PathVariable(value="itemId")
String itemId,
@RequestParam(value="ratingType",required=false,defaultValue="PRODUCT")
String ratingType,
@RequestBody
ReviewDetailWrapper reviewDetailWrapper)
Copyright © 2020. All rights reserved.