Class PromotionsController


  • @Controller("promotionsControllerV1")
    @RequestMapping("/{baseSiteId}/promotions")
    public class PromotionsController
    extends BaseController
    Main Controller for Promotions
    • Constructor Detail

      • PromotionsController

        public PromotionsController()
    • Method Detail

      • getPromotionByCode

        @Secured("ROLE_TRUSTED_CLIENT")
        @RequestMapping(value="/{code}",
                        method=GET)
        @ResponseBody
        public PromotionData getPromotionByCode​(@PathVariable
                                                java.lang.String code,
                                                @RequestParam(required=false)
                                                java.lang.String options)
        Web service handler for the getPromotionByCode call. The options are turned into a Set and passed on to the facade. BASIC is included by default.
        Sample Call: https://localhost:9002/rest/v1/{SITE}/promotions/{CODE}?options=BASIC%2CEXTENDED
        Keep in mind ',' needs to be encoded as %2C
        Parameters:
        code - - the unique code used to identify a promotion
        options - - a String enumerating the detail level, values are BASIC (included by default), EXTENDED. Combine by using a ',', which needs to be encoded as part of a URI using URLEncoding: %2C.
        Returns:
        the PromotionData which will be marshaled to JSON or XML based on Accept-Header
      • getPromotionList

        protected java.util.List<PromotionData> getPromotionList​(java.lang.String type,
                                                                 java.lang.String promotionGroup)
      • getPromotionList

        protected java.util.List<PromotionData> getPromotionList​(java.lang.String type)
      • extractOptions

        protected java.util.Set<PromotionOption> extractOptions​(java.lang.String options)