Class CancelServiceOrderPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
com.sap.hybris.sapserviceorderaddon.controllers.CancelServiceOrderPageController
@Controller
@RequestMapping("/my-account/order")
public class CancelServiceOrderPageController
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, CancelServiceForm serviceOrderCancelForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) protected CancelServiceForminitializeForm(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>prepareServiceOrderCancelEntryData(OrderData orderData, CancelServiceForm serviceOrderCancelForm) It prepares a list ofOrderCancelEntryDataobject to be set in the entries ofOrderCancelRequestDataprotected 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) 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
-
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
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
-
prepareServiceOrderCancelEntryData
protected List<OrderCancelEntryData> prepareServiceOrderCancelEntryData(OrderData orderData, CancelServiceForm serviceOrderCancelForm) 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
-