Class ProductPageController


  • @Controller
    @RequestMapping("/**/p")
    public class ProductPageController
    extends AbstractPageController
    Controller for product details page
    • Constructor Detail

      • ProductPageController

        public ProductPageController()
    • Method Detail

      • productDetail

        @RequestMapping(value="/{productCode:.*}",
                        method=GET)
        public java.lang.String productDetail​(@PathVariable("productCode")
                                              java.lang.String encodedProductCode,
                                              org.springframework.ui.Model model,
                                              javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response)
                                       throws CMSItemNotFoundException,
                                              java.io.UnsupportedEncodingException
        Throws:
        CMSItemNotFoundException
        java.io.UnsupportedEncodingException
      • productOrderForm

        @RequestMapping(value="/{productCode:.*}/orderForm",
                        method=GET)
        public java.lang.String productOrderForm​(@PathVariable("productCode")
                                                 java.lang.String encodedProductCode,
                                                 org.springframework.ui.Model model,
                                                 javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
                                          throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • showZoomImages

        @RequestMapping(value="/{productCode:.*}/zoomImages",
                        method=GET)
        public java.lang.String showZoomImages​(@PathVariable("productCode")
                                               java.lang.String encodedProductCode,
                                               @RequestParam(value="galleryPosition",required=false)
                                               java.lang.String galleryPosition,
                                               org.springframework.ui.Model model)
      • showQuickView

        @RequestMapping(value="/{productCode:.*}/quickView",
                        method=GET)
        public java.lang.String showQuickView​(@PathVariable("productCode")
                                              java.lang.String encodedProductCode,
                                              org.springframework.ui.Model model,
                                              javax.servlet.http.HttpServletRequest request)
      • postReview

        @RequestMapping(value="/{productCode:.*}/review",
                        method={GET,POST})
        public java.lang.String postReview​(@PathVariable("productCode")
                                           java.lang.String encodedProductCode,
                                           ReviewForm form,
                                           org.springframework.validation.BindingResult result,
                                           org.springframework.ui.Model model,
                                           javax.servlet.http.HttpServletRequest request,
                                           org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttrs)
                                    throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • reviewHtml

        @RequestMapping(value="/{productCode:.*}/reviewhtml/{numberOfReviews:.*}",
                        method=GET)
        public java.lang.String reviewHtml​(@PathVariable("productCode")
                                           java.lang.String encodedProductCode,
                                           @PathVariable("numberOfReviews")
                                           java.lang.String numberOfReviews,
                                           org.springframework.ui.Model model,
                                           javax.servlet.http.HttpServletRequest request)
      • writeReview

        @RequestMapping(value="/{productCode:.*}/writeReview",
                        method=GET)
        public java.lang.String writeReview​(@PathVariable("productCode")
                                            java.lang.String encodedProductCode,
                                            org.springframework.ui.Model model)
                                     throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • writeReview

        @RequestMapping(value="/{productCode:.*}/writeReview",
                        method=POST)
        public java.lang.String writeReview​(@PathVariable("productCode")
                                            java.lang.String encodedProductCode,
                                            ReviewForm form,
                                            org.springframework.validation.BindingResult result,
                                            org.springframework.ui.Model model,
                                            javax.servlet.http.HttpServletRequest request,
                                            org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttrs)
                                     throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • productFutureStock

        @RequestMapping(value="/{productCode:.*}/futureStock",
                        method=GET)
        public java.lang.String productFutureStock​(@PathVariable("productCode")
                                                   java.lang.String encodedProductCode,
                                                   org.springframework.ui.Model model,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • productSkusFutureStock

        @ResponseBody
        @RequestMapping(value="/{productCode:.*}/grid/skusFutureStock",
                        method=POST,
                        produces="application/json")
        public final java.util.Map<java.lang.String,​java.lang.Object> productSkusFutureStock​(FutureStockForm form,
                                                                                                   org.springframework.ui.Model model)
      • updatePageTitle

        protected void updatePageTitle​(java.lang.String productCode,
                                       org.springframework.ui.Model model)
      • populateProductDetailForDisplay

        protected void populateProductDetailForDisplay​(java.lang.String productCode,
                                                       org.springframework.ui.Model model,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       java.util.List<ProductOption> extraOptions)
                                                throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • populateProductData

        protected void populateProductData​(ProductData productData,
                                           org.springframework.ui.Model model)
      • sortVariantOptionData

        protected void sortVariantOptionData​(ProductData productData)
      • getGalleryImages

        protected java.util.List<java.util.Map<java.lang.String,​ImageData>> getGalleryImages​(ProductData productData)
      • addFormatsToGalleryImages

        protected void addFormatsToGalleryImages​(java.util.List<java.util.Map<java.lang.String,​ImageData>> galleryImages,
                                                 java.util.List<ImageData> images)