Class CancelServiceOrderPageController


  • @Controller
    @RequestMapping("/my-account/order")
    public class CancelServiceOrderPageController
    extends AbstractSearchPageController
    Controller for cancel order pages
    • Constructor Detail

      • CancelServiceOrderPageController

        public CancelServiceOrderPageController()
    • Method Detail

      • showCancelOrderPage

        @RequestMapping(value="/{orderCode:.*}/cancelservice",
                        method=POST)
        public java.lang.String showCancelOrderPage​(@PathVariable("orderCode")
                                                    java.lang.String orderCode,
                                                    org.springframework.ui.Model model,
                                                    org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                             throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • confirmCancelOrderPage

        @RequestMapping(value="/{orderCode:.*}/cancelservice/cancelconfirmation",
                        method=POST)
        public java.lang.String confirmCancelOrderPage​(@PathVariable("orderCode")
                                                       java.lang.String orderCode,
                                                       @ModelAttribute("serviceOrderEntryCancelForm")
                                                       CancelServiceForm serviceOrderCancelForm,
                                                       org.springframework.ui.Model model,
                                                       org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                                throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.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
      • initializeForm

        protected CancelServiceForm initializeForm​(OrderData orderData)
        initialize the input form and takes care of the multiD case
        Parameters:
        orderData - The order to be cancelled
        Returns:
        initialized form with initial values of 0
      • populateOrderCancelEntries

        protected void populateOrderCancelEntries​(OrderData orderData,
                                                  java.util.Map<java.lang.Integer,​java.lang.Integer> cancelEntryQuantity)
        Populates the order cancel entries quantity map
        Parameters:
        orderData - the OrderData which is used to populate the map
        cancelEntryQuantity - the map to be populated