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 AbstractSearchPageControllerController for return 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 Modifier and Type Field Description static java.lang.StringBREADCRUMBS_ATTRstatic org.slf4j.LoggerLOGstatic java.lang.StringMY_ACCOUNT_ORDERstatic java.lang.StringMY_ACCOUNT_ORDERSstatic java.lang.StringMY_ACCOUNT_RETURNSstatic java.lang.StringREDIRECT_TO_ORDERS_HISTORY_PAGEstatic java.lang.StringRETRUN_CONFIRM_ORDER_CMS_PAGEstatic java.lang.StringRETURN_ORDER_CMS_PAGE-
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 ReturnOrderPageController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconfirmReturnOrderPage(java.lang.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(java.util.Map<java.lang.Integer,java.lang.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 java.lang.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(java.lang.Long qty, OrderEntryData orderEntryData)Updates theOrderEntryData.returnedItemsPricefor the given requested return quantityjava.lang.StringshowReturnOrderPage(java.lang.String orderCode, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)java.lang.StringsubmitCancelOrderPage(java.lang.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, 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
-
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
BREADCRUMBS_ATTR
public static final java.lang.String BREADCRUMBS_ATTR
- See Also:
- Constant Field Values
-
MY_ACCOUNT_ORDERS
public static final java.lang.String MY_ACCOUNT_ORDERS
- See Also:
- Constant Field Values
-
REDIRECT_TO_ORDERS_HISTORY_PAGE
public static final java.lang.String REDIRECT_TO_ORDERS_HISTORY_PAGE
- See Also:
- Constant Field Values
-
RETURN_ORDER_CMS_PAGE
public static final java.lang.String RETURN_ORDER_CMS_PAGE
- See Also:
- Constant Field Values
-
RETRUN_CONFIRM_ORDER_CMS_PAGE
public static final java.lang.String RETRUN_CONFIRM_ORDER_CMS_PAGE
- See Also:
- Constant Field Values
-
MY_ACCOUNT_ORDER
public static final java.lang.String MY_ACCOUNT_ORDER
- See Also:
- Constant Field Values
-
MY_ACCOUNT_RETURNS
public static final java.lang.String MY_ACCOUNT_RETURNS
- See Also:
- Constant Field Values
-
-
Method Detail
-
showReturnOrderPage
@RequestMapping(value="/{orderCode:.*}/returns", method={POST,GET}) public java.lang.String showReturnOrderPage(@PathVariable("orderCode") java.lang.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 java.lang.String confirmReturnOrderPage(@PathVariable("orderCode") java.lang.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 java.lang.String submitCancelOrderPage(@PathVariable("orderCode") java.lang.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
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
-
initializeForm
protected OrderEntryReturnForm initializeForm(OrderData orderData)
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(java.util.Map<java.lang.Integer,java.lang.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
protected boolean isMultiD(OrderEntryData orderEntryData)
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
protected void setReturnedItemsPrice(java.lang.Long qty, OrderEntryData orderEntryData)Updates theOrderEntryData.returnedItemsPricefor the given requested return quantity- Parameters:
qty- the quantity to be returned from the givenOrderEntryDataorderEntryData- theOrderEntryData
-
redirectToOrdersHistory
protected java.lang.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
-
-