Class CancelServiceOrderPageController


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

    • CancelServiceOrderPageController

      public CancelServiceOrderPageController()
  • Method Details

    • showCancelOrderPage

      @RequestMapping(value="/{orderCode:.*}/cancelservice", method=POST) public String showCancelOrderPage(@PathVariable("orderCode") 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 String confirmCancelOrderPage(@PathVariable("orderCode") 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
    • setCancellablePrice

      protected void setCancellablePrice(Long qty, OrderEntryData orderEntryData)
      Updates the OrderEntryData.cancelledItemsPrice for the given requested cancel quantity
      Parameters:
      qty - the quantity to be cancelled from the given OrderEntryData
      orderEntryData - the OrderEntryData
    • prepareServiceOrderCancelEntryData

      protected List<OrderCancelEntryData> prepareServiceOrderCancelEntryData(OrderData orderData, CancelServiceForm serviceOrderCancelForm)
      It prepares a list of OrderCancelEntryData object to be set in the entries of OrderCancelRequestData
      Parameters:
      cancelEntryQuantityMap - map of order entry and cancel quantity
      Returns:
      list of OrderCancelEntryData representing the map of order entry and cancel quantity
    • 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, Map<Integer,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