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 AbstractSearchPageControllerController for cancel order pages
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController
AbstractSearchPageController.SearchResultsData<RESULT>, AbstractSearchPageController.ShowMode
-
Nested 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_LIMIT
-
Fields 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_8
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT
-
-
Constructor Summary
Constructors Constructor Description CancelServiceOrderPageController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconfirmCancelOrderPage(java.lang.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, java.util.Map<java.lang.Integer,java.lang.Integer> cancelEntryQuantity)Populates the order cancel entries quantity mapprotected java.util.List<OrderCancelEntryData>prepareServiceOrderCancelEntryData(OrderData orderData, CancelServiceForm serviceOrderCancelForm)It prepares a list ofOrderCancelEntryDataobject to be set in the entries ofOrderCancelRequestDataprotected voidsetCancellablePrice(java.lang.Long qty, OrderEntryData orderEntryData)Updates theOrderEntryData.cancelledItemsPricefor the given requested cancel quantityjava.lang.StringshowCancelOrderPage(java.lang.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, refineFacets
-
Methods 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, urlEncode
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
-
-
-
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 givenOrderEntryDatais for multidimensional product- Parameters:
orderEntry- the givenOrderEntryData- Returns:
- true, if the given
OrderEntryDatais for multidimensional product
-
setCancellablePrice
protected void setCancellablePrice(java.lang.Long qty, OrderEntryData orderEntryData)Updates theOrderEntryData.cancelledItemsPricefor the given requested cancel quantity- Parameters:
qty- the quantity to be cancelled from the givenOrderEntryDataorderEntryData- theOrderEntryData
-
prepareServiceOrderCancelEntryData
protected java.util.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
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- theOrderDatawhich is used to populate the mapcancelEntryQuantity- the map to be populated
-
-