Class ReturnOrderPageController
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.ReturnOrderPageController
@Controller
@RequestMapping("/my-account/order")
public class ReturnOrderPageController
extends AbstractSearchPageController
Controller for return 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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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 TypeMethodDescriptionconfirmReturnOrderPage(String orderCode, OrderEntryReturnForm orderEntryReturnForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) protected OrderEntryReturnForminitializeForm(OrderData orderData) Initialize the input form and takes care of the multiD caseprotected booleanisMultiD(OrderEntryData orderEntryData) A method that checks if the product associated with this orderEntry is a multi dimensional productprotected booleanisMultidimensionalEntry(OrderEntryData orderEntry) Confirms if the givenOrderEntryDatais for multidimensional productprotected voidpopulateMapForNestedEntries(Map<Integer, Long> returnEntryQuantityMap, OrderEntryData orderEntryData) protected ReturnRequestDataprepareReturnRequestData(OrderData order, OrderEntryReturnForm orderEntryReturnForm) It prepares theReturnRequestDataobject by taking the order and the map of orderentriesOrderEntryDatanumber and returned quantitiesprotected StringredirectToOrdersHistory(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) Redirects the flow to the Orders History page and notifies the user with theRedirectAttributes.protected voidsetReturnedItemsPrice(Long qty, OrderEntryData orderEntryData) Updates theOrderEntryData.returnedItemsPricefor the given requested return quantityshowReturnOrderPage(String orderCode, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) submitCancelOrderPage(String orderCode, OrderEntryReturnForm orderEntryReturnForm, 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
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
BREADCRUMBS_ATTR
- See Also:
-
MY_ACCOUNT_ORDERS
- See Also:
-
REDIRECT_TO_ORDERS_HISTORY_PAGE
- See Also:
-
RETURN_ORDER_CMS_PAGE
- See Also:
-
RETRUN_CONFIRM_ORDER_CMS_PAGE
- See Also:
-
MY_ACCOUNT_ORDER
- See Also:
-
MY_ACCOUNT_RETURNS
- See Also:
-
-
Constructor Details
-
ReturnOrderPageController
public ReturnOrderPageController()
-
-
Method Details
-
showReturnOrderPage
@RequestMapping(value="/{orderCode:.*}/returns", method={POST,GET}) public String showReturnOrderPage(@PathVariable("orderCode") String orderCode, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
confirmReturnOrderPage
@RequestMapping(value="/{orderCode:.*}/returns/confirm", method=POST) public String confirmReturnOrderPage(@PathVariable("orderCode") String orderCode, @ModelAttribute("orderEntryReturnForm") OrderEntryReturnForm orderEntryReturnForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
submitCancelOrderPage
@RequestMapping(value="/{orderCode:.*}/returns/submit", method=POST) public String submitCancelOrderPage(@PathVariable("orderCode") String orderCode, @ModelAttribute("orderEntryCancelForm") OrderEntryReturnForm orderEntryReturnForm, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws CMSItemNotFoundException - Throws:
CMSItemNotFoundException
-
prepareReturnRequestData
protected ReturnRequestData prepareReturnRequestData(OrderData order, OrderEntryReturnForm orderEntryReturnForm) It prepares theReturnRequestDataobject by taking the order and the map of orderentriesOrderEntryDatanumber and returned quantities- Parameters:
order- orderOrderDatawhich we want to returnorderEntryReturnForm- aOrderEntryReturnFormmap of orderentries number and the returned quantities- Returns:
- returnRequest
ReturnRequestData
-
isMultidimensionalEntry
Confirms if the givenOrderEntryDatais for multidimensional product- Parameters:
orderEntry- the givenOrderEntryData- Returns:
- true, if the given
OrderEntryDatais for multidimensional product
-
initializeForm
Initialize the input form and takes care of the multiD case- Parameters:
orderData- The given orderOrderDatato be returned- Returns:
- initialized form
OrderEntryReturnFormwith initial values of 0
-
populateMapForNestedEntries
protected void populateMapForNestedEntries(Map<Integer, Long> returnEntryQuantityMap, OrderEntryData orderEntryData) - Parameters:
returnEntryQuantityMap- The map to populate with entry number and quantity to returnorderEntryData- The order entryOrderEntryDatathat holds a MultiD product
-
isMultiD
A method that checks if the product associated with this orderEntry is a multi dimensional product- Parameters:
orderEntryData- the order entryOrderEntryData- Returns:
- true if the product in the orderEntryData is multiD and false if it is not set or it is not.
-
setReturnedItemsPrice
Updates theOrderEntryData.returnedItemsPricefor the given requested return quantity- Parameters:
qty- the quantity to be returned from the givenOrderEntryDataorderEntryData- theOrderEntryData
-
redirectToOrdersHistory
protected String redirectToOrdersHistory(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) Redirects the flow to the Orders History page and notifies the user with theRedirectAttributes.- Parameters:
redirectModel- theRedirectAttributesused to display a message to the user- Returns:
- View String
-