Class AccountReturnsPageController


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

      • LOG

        public static final org.slf4j.Logger LOG
      • MY_ACCOUNT_RETURNS_PAGE

        public static final java.lang.String MY_ACCOUNT_RETURNS_PAGE
        See Also:
        Constant Field Values
      • TEXT_ACCOUNT_RETURNS_HISTORY

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

      • AccountReturnsPageController

        public AccountReturnsPageController()
    • Method Detail

      • getMyReturnRequests

        @RequestMapping(method=GET)
        public java.lang.String getMyReturnRequests​(@RequestParam(value="page",defaultValue="0")
                                                    int pageNumber,
                                                    @RequestParam(value="show",defaultValue="Page")
                                                    AbstractSearchPageController.ShowMode showMode,
                                                    @RequestParam(value="sort",required=false)
                                                    java.lang.String sortCode,
                                                    org.springframework.ui.Model model)
                                             throws CMSItemNotFoundException
        Lists all return requests
        Parameters:
        pageNumber -
        showMode -
        sortCode -
        model -
        Returns:
        View String
        Throws:
        CMSItemNotFoundException
      • showReturnRequestDetailsPage

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

        protected boolean isUserValidForOrder​(OrderData orderData)
        Validates if the current CustomerData matches the user in the OrderData and that it is part of the same BaseStoreModel
        Parameters:
        orderData - the OrderData
        Returns:
        true if the order is tied to the current customer and the current base store.