Class AbstractTravelFinderComponentController
java.lang.Object
de.hybris.platform.addonsupport.controllers.AbstractAddOnController
de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController<T>
de.hybris.platform.travelacceleratorstorefront.controllers.cms.SubstitutingCMSAddOnComponentController<AbstractFinderComponentModel>
de.hybris.platform.travelacceleratorstorefront.controllers.cms.AbstractFinderComponentController
de.hybris.platform.shoppingcommons.controllers.cms.AbstractTravelFinderComponentController
- Direct Known Subclasses:
ShoppingPackageFinderComponentController,ShoppingTravelFinderComponentController
public abstract class AbstractTravelFinderComponentController
extends AbstractFinderComponentController
Abstract Travel Finder Component Controller
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.addonsupport.controllers.AbstractAddOnController
de.hybris.platform.addonsupport.controllers.AbstractAddOnController.HttpNotFoundException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccommodationFinderValidatorprotected FareFinderValidatorFields inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.cms.AbstractFinderComponentController
HIDE_FINDER_TITLEFields inherited from class de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController
COMPONENT, COMPONENT_UID, FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildUrlParameters(AccommodationFinderForm accommodationFinderForm) protected PassengerTypeQuantityDataprotected List<PassengerTypeQuantityData>createPassengerTypeQuantityData(AccommodationFinderForm accommodationFinderForm) protected voidfillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, AbstractFinderComponentModel component) protected AccommodationFinderFormprotected FareFinderFormprotected voidinitializeForms(TravelFinderForm travelFinderForm) protected TravelFinderForminitializeTravelFinderForm(org.springframework.ui.Model model) protected voidresolveDestinationLocation(String arrivalLocation, String arrivalLocationSuggestionType, AccommodationFinderForm accommodationFinderForm) This method resolves the destination to be used to build the query string for accommodation offering search.protected abstract voidsetJourneyTypeInSession(TravelFinderForm travelFinderForm) protected voidvalidateAccommodationFinderForm(AbstractTravelValidator accommodationFinderValidator, AccommodationFinderForm accommodationFinderForm, org.springframework.validation.BindingResult bindingResult, String formName) protected voidvalidateFareFinderForm(AbstractTravelValidator fareFinderValidator, FareFinderForm fareFinderForm, org.springframework.validation.BindingResult bindingResult, String formName) protected voidvalidateForms(TravelFinderForm travelFinderForm, org.springframework.validation.BindingResult bindingResult) validateTravelFinderForm(@Valid TravelFinderForm travelFinderForm, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) protected voidverifyAndUpdateDates(TravelFinderForm travelFinderForm) Methods inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.cms.AbstractFinderComponentController
createRoomStayCandidatesData, getCabinClassFacade, getComponent, getFormErrorResponseData, getMaxGuestQuantity, getPassengerTypeFacade, getPassengerTypeQuantityList, getSessionService, getTravellerSortStrategy, populateAccommodationsQuantity, populatePassengersQuantity, setCabinClassesOnModel, setCollapseExpandFlagMethods inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.cms.SubstitutingCMSAddOnComponentController
getAddonUiExtensionName, getConfigurationService, setMaxAllowedCheckInCheckOutDateDifferenceMethods inherited from class de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController
checkIfComponentNotEmpty, getCmsComponentFolder, getCmsComponentService, getCmsPageContextService, getRequestContextData, getTypeCode, getView, getViewResourceName, handleComponent, handleGet, setCmsComponentServiceMethods inherited from class de.hybris.platform.addonsupport.controllers.AbstractAddOnController
addRequestToModel, getBean
-
Field Details
-
fareFinderValidator
-
accommodationFinderValidator
-
-
Constructor Details
-
AbstractTravelFinderComponentController
public AbstractTravelFinderComponentController()
-
-
Method Details
-
fillModel
protected void fillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, AbstractFinderComponentModel component) - Specified by:
fillModelin classde.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController<AbstractFinderComponentModel>
-
verifyAndUpdateDates
-
initializeTravelFinderForm
-
initializeAccommodationFinderForm
-
initializeFareFinderForm
-
validateTravelFinderForm
@RequestMapping(value="/validate-travel-finder-form", method=POST) @ResponseBody public FormErrorResponseData validateTravelFinderForm(@Valid @Valid TravelFinderForm travelFinderForm, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel) -
setJourneyTypeInSession
-
initializeForms
-
resolveDestinationLocation
protected void resolveDestinationLocation(String arrivalLocation, String arrivalLocationSuggestionType, AccommodationFinderForm accommodationFinderForm) This method resolves the destination to be used to build the query string for accommodation offering search. It tries to resolve the location from the transport facility, if no result is found we fall back to Google search and use geographic coordinates- Parameters:
arrivalLocation-arrivalLocationSuggestionType-accommodationFinderForm-
-
validateForms
protected void validateForms(TravelFinderForm travelFinderForm, org.springframework.validation.BindingResult bindingResult) -
validateFareFinderForm
protected void validateFareFinderForm(AbstractTravelValidator fareFinderValidator, FareFinderForm fareFinderForm, org.springframework.validation.BindingResult bindingResult, String formName) -
validateAccommodationFinderForm
protected void validateAccommodationFinderForm(AbstractTravelValidator accommodationFinderValidator, AccommodationFinderForm accommodationFinderForm, org.springframework.validation.BindingResult bindingResult, String formName) -
createPassengerTypeQuantityData
protected List<PassengerTypeQuantityData> createPassengerTypeQuantityData(AccommodationFinderForm accommodationFinderForm) -
clonePassengerTypeQuantityData
-
buildUrlParameters
-