Class CancelOrderPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
de.hybris.platform.orderselfserviceaddon.controllers.pages.CancelOrderPageController
@Controller
@RequestMapping("/my-account/order")
public class CancelOrderPageController
extends AbstractSearchPageController
Controller for cancel order pages
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
AbstractSearchPageController.SearchResultsData<RESULT>, AbstractSearchPageController.ShowModeNested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
MAX_PAGE_LIMITFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfirmCancelOrderPage(String orderCode, OrderEntryCancelForm orderEntryCancelForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) protected OrderEntryCancelForminitializeForm(OrderData orderData) initialize the input form and takes care of the multiD caseprotected booleanisMultidimensionalEntry(OrderEntryData orderEntry) Confirms if the givenOrderEntryDatais for multidimensional productprotected voidpopulateOrderCancelEntries(OrderData orderData, Map<Integer, Integer> cancelEntryQuantity) Populates the order cancel entries quantity mapprotected List<OrderCancelEntryData>prepareOrderCancelEntryData(Map<Integer, Integer> cancelEntryQuantityMap) It prepares a list ofOrderCancelEntryDataobject to be set in the entries ofOrderCancelRequestDataprotected OrderCancelRequestDataprepareOrderCancelRequestData(String orderCode, Map<Integer, Integer> cancelEntryQuantityMap) It prepares theOrderCancelRequestDataobject by taking the order code and a map of order entry and cancel quantity and sets the userprotected voidsetCancellablePrice(Long qty, OrderEntryData orderEntryData) Updates theOrderEntryData.cancelledItemsPricefor the given requested cancel quantityshowCancelOrderPage(String orderCode, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) submitCancelOrderPage(String orderCode, OrderEntryCancelForm orderEntryCancelForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
calculateShowAll, calculateShowPaged, convertBreadcrumbsToFacets, createEmptyPagination, createPageableData, encodeSearchPageData, existsFacetValueWithName, getMaxSearchPageSize, getSearchPageSize, isShowAllAllowed, populateModel, processFacetData, processFacetDatas, refineFacetsMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Constructor Details
-
CancelOrderPageController
public CancelOrderPageController()
-
-
Method Details
-
showCancelOrderPage
@RequestMapping(value="/{orderCode:.*}/cancel", method={POST,GET}) public String showCancelOrderPage(@PathVariable("orderCode") String orderCode, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
confirmCancelOrderPage
@RequestMapping(value="/{orderCode:.*}/cancel/cancelconfirmation", method=POST) public String confirmCancelOrderPage(@PathVariable("orderCode") String orderCode, @ModelAttribute("orderEntryCancelForm") OrderEntryCancelForm orderEntryCancelForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
submitCancelOrderPage
@RequestMapping(value="/{orderCode:.*}/cancel/submit", method=POST) public String submitCancelOrderPage(@PathVariable("orderCode") String orderCode, @ModelAttribute("orderEntryCancelForm") OrderEntryCancelForm orderEntryCancelForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
isMultidimensionalEntry
Confirms if the givenOrderEntryDatais for multidimensional product- Parameters:
orderEntry- the givenOrderEntryData- Returns:
- true, if the given
OrderEntryDatais for multidimensional product
-
setCancellablePrice
Updates theOrderEntryData.cancelledItemsPricefor the given requested cancel quantity- Parameters:
qty- the quantity to be cancelled from the givenOrderEntryDataorderEntryData- theOrderEntryData
-
prepareOrderCancelRequestData
protected OrderCancelRequestData prepareOrderCancelRequestData(String orderCode, Map<Integer, Integer> cancelEntryQuantityMap) It prepares theOrderCancelRequestDataobject by taking the order code and a map of order entry and cancel quantity and sets the user- Parameters:
orderCode- which we want to request to cancelcancelEntryQuantityMap- map of order entry and cancel quantity- Returns:
- Populated
OrderCancelRequestData
-
prepareOrderCancelEntryData
protected List<OrderCancelEntryData> prepareOrderCancelEntryData(Map<Integer, Integer> cancelEntryQuantityMap) It prepares a list ofOrderCancelEntryDataobject to be set in the entries ofOrderCancelRequestData- Parameters:
cancelEntryQuantityMap- map of order entry and cancel quantity- Returns:
- list of
OrderCancelEntryDatarepresenting the map of order entry and cancel quantity
-
initializeForm
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- theOrderDatawhich is used to populate the mapcancelEntryQuantity- the map to be populated
-