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 CustomerCoupon2CustomerWsDTOclaimCoupon(java.lang.String couponCode, java.lang.String fields)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)CustomerCouponNotificationWsDTOsubscribeNotification(java.lang.String couponCode, java.lang.String fields)voidunsubscribeNotification(java.lang.String couponCode)protected voidvalidateCoupon(org.springframework.validation.Validator validator, java.lang.Object obj, java.lang.String objName)
-
-
-
Method Detail
-
getCustomerCoupons
@ResponseBody @Secured("ROLE_CUSTOMERGROUP") @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)
-
claimCoupon
@Secured("ROLE_CUSTOMERGROUP") @PostMapping("/{couponCode}/claim") @ResponseStatus(CREATED) @ResponseBody public CustomerCoupon2CustomerWsDTO claimCoupon(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
subscribeNotification
@Secured("ROLE_CUSTOMERGROUP") @PostMapping("/{couponCode}/notification") @ResponseStatus(CREATED) @ResponseBody public CustomerCouponNotificationWsDTO subscribeNotification(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
unsubscribeNotification
@ResponseStatus(code=OK) @Secured("ROLE_CUSTOMERGROUP") @DeleteMapping("/{couponCode}/notification") public void unsubscribeNotification(@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()
-
-