Class CustomerCouponsController
- java.lang.Object
-
- de.hybris.platform.customercouponoccaddon.controllers.customercoupon.CustomerCouponsController
-
@Controller @RequestMapping("/{baseSiteId}/users/{userId}/customercoupons") public class CustomerCouponsController extends java.lang.ObjectAPIs for my coupons.
-
-
Constructor Summary
Constructors Constructor Description CustomerCouponsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomerCoupon2CustomerWsDTOdoClaimCustomerCoupon(java.lang.String couponCode, java.lang.String fields)CustomerCouponNotificationWsDTOdoSubscribeToCustomerCoupon(java.lang.String couponCode, java.lang.String fields)voiddoUnsubscribeFromCustomerCoupon(java.lang.String couponCode)protected CustomerCouponFacadegetCustomerCouponFacade()CustomerCouponSearchResultWsDTOgetCustomerCoupons(int currentPage, int pageSize, java.lang.String sort, boolean needsTotal, java.lang.String fields)protected CustomerFacadegetCustomerFacade()protected CustomerNotificationPreferenceCheckStrategygetCustomerNotificationPreferenceCheckStrategy()protected UserWsDTOgetCustomerWsDTO(java.lang.String fields)protected DataMappergetDataMapper()protected WebPaginationUtilsgetWebPaginationUtils()protected voidrecalculatePageSize(SearchPageData searchPageData)protected voidvalidateCoupon(org.springframework.validation.Validator validator, java.lang.Object obj, java.lang.String objName)
-
-
-
Method Detail
-
getCustomerCoupons
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @GetMapping public CustomerCouponSearchResultWsDTO getCustomerCoupons(@RequestParam(name="currentPage",required=false,defaultValue="0") int currentPage, @RequestParam(name="pageSize",required=false,defaultValue="10") int pageSize, @RequestParam(name="sort",required=false) java.lang.String sort, @RequestParam(name="needsTotal",required=false,defaultValue="true") boolean needsTotal, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
doClaimCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping("/{couponCode}/claim") @ResponseStatus(CREATED) @ResponseBody public CustomerCoupon2CustomerWsDTO doClaimCustomerCoupon(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
doSubscribeToCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping("/{couponCode}/notification") @ResponseStatus(CREATED) @ResponseBody public CustomerCouponNotificationWsDTO doSubscribeToCustomerCoupon(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
doUnsubscribeFromCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(code=OK) @DeleteMapping("/{couponCode}/notification") public void doUnsubscribeFromCustomerCoupon(@PathVariable java.lang.String couponCode)
-
validateCoupon
protected void validateCoupon(org.springframework.validation.Validator validator, java.lang.Object obj, java.lang.String objName)
-
recalculatePageSize
protected void recalculatePageSize(SearchPageData searchPageData)
-
getCustomerWsDTO
protected UserWsDTO getCustomerWsDTO(java.lang.String fields)
-
getCustomerCouponFacade
protected CustomerCouponFacade getCustomerCouponFacade()
-
getDataMapper
protected DataMapper getDataMapper()
-
getCustomerNotificationPreferenceCheckStrategy
protected CustomerNotificationPreferenceCheckStrategy getCustomerNotificationPreferenceCheckStrategy()
-
getWebPaginationUtils
protected WebPaginationUtils getWebPaginationUtils()
-
getCustomerFacade
protected CustomerFacade getCustomerFacade()
-
-