Class ReturnOrderPageController


  • @Controller
    @RequestMapping("/my-account/order")
    public class ReturnOrderPageController
    extends AbstractSearchPageController
    Controller for return order pages
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
      • BREADCRUMBS_ATTR

        public static final java.lang.String BREADCRUMBS_ATTR
        See Also:
        Constant Field Values
      • MY_ACCOUNT_ORDERS

        public static final java.lang.String MY_ACCOUNT_ORDERS
        See Also:
        Constant Field Values
      • REDIRECT_TO_ORDERS_HISTORY_PAGE

        public static final java.lang.String REDIRECT_TO_ORDERS_HISTORY_PAGE
        See Also:
        Constant Field Values
      • RETURN_ORDER_CMS_PAGE

        public static final java.lang.String RETURN_ORDER_CMS_PAGE
        See Also:
        Constant Field Values
      • RETRUN_CONFIRM_ORDER_CMS_PAGE

        public static final java.lang.String RETRUN_CONFIRM_ORDER_CMS_PAGE
        See Also:
        Constant Field Values
      • MY_ACCOUNT_ORDER

        public static final java.lang.String MY_ACCOUNT_ORDER
        See Also:
        Constant Field Values
      • MY_ACCOUNT_RETURNS

        public static final java.lang.String MY_ACCOUNT_RETURNS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReturnOrderPageController

        public ReturnOrderPageController()
    • Method Detail

      • showReturnOrderPage

        @RequestMapping(value="/{orderCode:.*}/returns",
                        method={POST,GET})
        public java.lang.String showReturnOrderPage​(@PathVariable("orderCode")
                                                    java.lang.String orderCode,
                                                    org.springframework.ui.Model model,
                                                    org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                             throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • confirmReturnOrderPage

        @RequestMapping(value="/{orderCode:.*}/returns/confirm",
                        method=POST)
        public java.lang.String confirmReturnOrderPage​(@PathVariable("orderCode")
                                                       java.lang.String orderCode,
                                                       @ModelAttribute("orderEntryReturnForm")
                                                       OrderEntryReturnForm orderEntryReturnForm,
                                                       org.springframework.ui.Model model,
                                                       org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                                throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • submitCancelOrderPage

        @RequestMapping(value="/{orderCode:.*}/returns/submit",
                        method=POST)
        public java.lang.String submitCancelOrderPage​(@PathVariable("orderCode")
                                                      java.lang.String orderCode,
                                                      @ModelAttribute("orderEntryCancelForm")
                                                      OrderEntryReturnForm orderEntryReturnForm,
                                                      org.springframework.ui.Model model,
                                                      org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                               throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • isMultidimensionalEntry

        protected boolean isMultidimensionalEntry​(OrderEntryData orderEntry)
        Confirms if the given OrderEntryData is for multidimensional product
        Parameters:
        orderEntry - the given OrderEntryData
        Returns:
        true, if the given OrderEntryData is for multidimensional product
      • populateMapForNestedEntries

        protected void populateMapForNestedEntries​(java.util.Map<java.lang.Integer,​java.lang.Long> returnEntryQuantityMap,
                                                   OrderEntryData orderEntryData)
        Parameters:
        returnEntryQuantityMap - The map to populate with entry number and quantity to return
        orderEntryData - The order entry OrderEntryData that holds a MultiD product
      • isMultiD

        protected boolean isMultiD​(OrderEntryData orderEntryData)
        A method that checks if the product associated with this orderEntry is a multi dimensional product
        Parameters:
        orderEntryData - the order entry OrderEntryData
        Returns:
        true if the product in the orderEntryData is multiD and false if it is not set or it is not.
      • redirectToOrdersHistory

        protected java.lang.String redirectToOrdersHistory​(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
        Redirects the flow to the Orders History page and notifies the user with the RedirectAttributes.
        Parameters:
        redirectModel - the RedirectAttributes used to display a message to the user
        Returns:
        View String