Class CancelReturnPageController


  • @Controller
    @RequestMapping("/my-account/returns")
    public class CancelReturnPageController
    extends AbstractSearchPageController
    Controller for cancel return page
    • Field Detail

      • BREADCRUMBS_ATTR

        protected static final java.lang.String BREADCRUMBS_ATTR
        See Also:
        Constant Field Values
      • MY_ACCOUNT_RETURNS

        protected static final java.lang.String MY_ACCOUNT_RETURNS
        See Also:
        Constant Field Values
      • REDIRECT_TO_RETURNS_HISTORY_PAGE

        protected static final java.lang.String REDIRECT_TO_RETURNS_HISTORY_PAGE
        See Also:
        Constant Field Values
      • CANCEL_RETURN_CMS_PAGE

        protected static final java.lang.String CANCEL_RETURN_CMS_PAGE
        See Also:
        Constant Field Values
      • RETURN_HISTORY_LABEL

        protected static final java.lang.String RETURN_HISTORY_LABEL
        See Also:
        Constant Field Values
      • RETURN_REQUEST_LABEL

        protected static final java.lang.String RETURN_REQUEST_LABEL
        See Also:
        Constant Field Values
      • RETURN_BREADCRUMB_LABEL

        protected static final java.lang.String RETURN_BREADCRUMB_LABEL
        See Also:
        Constant Field Values
      • CANCEL_RETURN_LABEL

        protected static final java.lang.String CANCEL_RETURN_LABEL
        See Also:
        Constant Field Values
    • Constructor Detail

      • CancelReturnPageController

        public CancelReturnPageController()
    • Method Detail

      • showCancelReturnPage

        @RequestMapping(value="{returnCode:.*}/cancel",
                        method={POST,GET})
        public java.lang.String showCancelReturnPage​(@PathVariable("returnCode")
                                                     java.lang.String returnCode,
                                                     org.springframework.ui.Model model,
                                                     org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                              throws CMSItemNotFoundException
        Displays the cancel return page
        Parameters:
        returnCode - the ReturnRequestModel.CODE
        model - the Model to which page attributes are added
        redirectModel - the RedirectAttributes
        Returns:
        View String
        Throws:
        CMSItemNotFoundException - if the CMS content is not found
      • submitCancelReturnPage

        @RequestMapping(value="/{returnCode:.*}/cancel/submit",
                        method=POST)
        public java.lang.String submitCancelReturnPage​(@PathVariable("returnCode")
                                                       java.lang.String returnCode,
                                                       org.springframework.ui.Model model,
                                                       org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                                throws CMSItemNotFoundException
        Submits the return cancellation request
        Parameters:
        returnCode - the ReturnRequestModel.CODE the Model to which page attributes are added
        redirectModel - the RedirectAttributes
        Returns:
        View String
        Throws:
        CMSItemNotFoundException - if the CMS content is not found
      • 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.