Class BookingDetailsPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.travelacceleratorstorefront.controllers.pages.BookingDetailsPageController
@Controller
@RequestMapping("/manage-booking")
public class BookingDetailsPageController
extends AbstractPageController
Controller class to handle Booking details page. This page can be accessed from MyProfilePage or BookingConfirmation
page in which case the access url is "/manage-booking/**" and also from ManageMyBooking component, in which case the
url is "/checkout/manage-booking/**"
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe constant BOOKING_DETAILS_USER_VALIDATION_ERROR.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_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.commercefacades.customer.CustomerFacadeGets disable currency selector.protected GUIDCookieStrategyGets guid cookie strategy.protected de.hybris.platform.servicelayer.i18n.I18NServicegetManageBookingsPage(String bookingReference, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) This method enables to retrieve a booking using the booking reference number.protected org.springframework.context.MessageSourcede.hybris.platform.servicelayer.session.SessionServiceloginManageMyBooking(AdditionalSecurityForm mmbForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) This method allows a traveller to login to bookingDetails page.voidsetCustomerFacade(de.hybris.platform.commercefacades.customer.CustomerFacade customerFacade) Sets customer facade.voidsetGuidCookieStrategy(GUIDCookieStrategy guidCookieStrategy) Sets guid cookie strategy.voidsetI18nService(de.hybris.platform.servicelayer.i18n.I18NService i18nService) Sets i 18 n service.voidsetMessageSource(org.springframework.context.MessageSource messageSource) Sets message source.voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.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, getHostConfigService, getLanguages, getPageTitleResolver, getRequestContextData, 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
-
BOOKING_DETAILS_USER_VALIDATION_ERROR
The constant BOOKING_DETAILS_USER_VALIDATION_ERROR.- See Also:
-
-
Constructor Details
-
BookingDetailsPageController
public BookingDetailsPageController()
-
-
Method Details
-
getManageBookingsPage
@RequestMapping(value="/booking-details/{bookingReference}", method=GET) public String getManageBookingsPage(@PathVariable String bookingReference, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException This method enables to retrieve a booking using the booking reference number.- Parameters:
bookingReference- a string representing bookingReferenceNumbermodel- a Model ObjectredirectModel- a RedirectAttributes object- Returns:
- a string for a redirected page.
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException- the cms item not found exception
-
loginManageMyBooking
@RequestMapping(value="/login", method=POST) public String loginManageMyBooking(AdditionalSecurityForm mmbForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException This method allows a traveller to login to bookingDetails page. Validates BookingReference and Last name, if success full retrieves booking and redirects to bookingDetails page, else redirects to home page with error message.- Parameters:
mmbForm- ManageMyBookingForm object.request- HttpServletRequestresponse- HttpServletResponsemodel- the model- Returns:
- a string for a redirected page.
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException- the cms item not found exception
-
getDisableCurrencySelector
Gets disable currency selector.- Returns:
- the disable currency selector
-
getSessionService
public de.hybris.platform.servicelayer.session.SessionService getSessionService()- Overrides:
getSessionServicein classAbstractPageController
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.- Parameters:
sessionService- the session service
-
getGuidCookieStrategy
Gets guid cookie strategy.- Returns:
- the guid cookie strategy
-
setGuidCookieStrategy
Sets guid cookie strategy.- Parameters:
guidCookieStrategy- the guid cookie strategy
-
getCustomerFacade
protected de.hybris.platform.commercefacades.customer.CustomerFacade getCustomerFacade()- Overrides:
getCustomerFacadein classAbstractPageController
-
setCustomerFacade
public void setCustomerFacade(de.hybris.platform.commercefacades.customer.CustomerFacade customerFacade) Sets customer facade.- Parameters:
customerFacade- the customer facade
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()- Overrides:
getMessageSourcein classAbstractPageController
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource) Sets message source.- Parameters:
messageSource- the message source
-
getI18nService
protected de.hybris.platform.servicelayer.i18n.I18NService getI18nService()- Overrides:
getI18nServicein classAbstractPageController
-
setI18nService
public void setI18nService(de.hybris.platform.servicelayer.i18n.I18NService i18nService) Sets i 18 n service.- Parameters:
i18nService- the 18 n service
-