Class FareFinderComponentController
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.traveladdon.controllers.cms.FareFinderComponentController
@Controller("FareFinderComponentController")
@RequestMapping("/view/FareFinderComponentController")
public class FareFinderComponentController
extends AbstractFinderComponentController
Fare Finder Controller for handling requests for the Fare Finder Component.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.addonsupport.controllers.AbstractAddOnController
de.hybris.platform.addonsupport.controllers.AbstractAddOnController.HttpNotFoundException -
Field Summary
FieldsFields 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(FareFinderForm fareFinderForm) protected booleancheckIfAdditionalTravellersArePresent(FareFinderForm fareFinderForm) Method check to see if there are any additional travelers other than Adults traveling on this trip.protected voidfillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, AbstractFinderComponentModel component) Method responsible for populating the data model with initial data for the componentprotected FormErrorResponseDatagetFormErrorResponseData(org.springframework.validation.BindingResult bindingResult, boolean hasErrorFlag) protected intprotected voidinitializeFareFinderForm(FareFinderForm fareFinderForm) performSearch(@Valid FareFinderForm fareFinderForm, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, org.springframework.validation.BindingResult bindingResult) The method is called when the form doesn't have any binding errors.protected voidpopulateInitialData(org.springframework.ui.Model model) validateFareFinderForm(@Valid FareFinderForm fareFinderForm, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model) Request handler for any search requests from the Fare Finder Component.Methods inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.cms.AbstractFinderComponentController
createRoomStayCandidatesData, getCabinClassFacade, getComponent, 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
-
SEARCH
- See Also:
-
fareFinderValidator
-
-
Constructor Details
-
FareFinderComponentController
public FareFinderComponentController()
-
-
Method Details
-
fillModel
protected void fillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, AbstractFinderComponentModel component) Method responsible for populating the data model with initial data for the component- Specified by:
fillModelin classde.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController<AbstractFinderComponentModel>
-
checkIfAdditionalTravellersArePresent
Method check to see if there are any additional travelers other than Adults traveling on this trip.- Parameters:
fareFinderForm-
-
validateFareFinderForm
@RequestMapping(value="/validate-fare-finder-form", method=POST) @ResponseBody public FormErrorResponseData validateFareFinderForm(@Valid @Valid FareFinderForm fareFinderForm, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model) Request handler for any search requests from the Fare Finder Component. This method will first perform JSR303 validation on the fareFinderForm bean before performing any custom validation.- Parameters:
fareFinderForm-bindingResult-model-- Returns:
- the location of the JSON tag used to render the errors in the front-end
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
getFormErrorResponseData
protected FormErrorResponseData getFormErrorResponseData(org.springframework.validation.BindingResult bindingResult, boolean hasErrorFlag) - Overrides:
getFormErrorResponseDatain classAbstractFinderComponentController
-
performSearch
@RequestMapping(value="/search", method=POST) public String performSearch(@Valid @Valid FareFinderForm fareFinderForm, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, org.springframework.validation.BindingResult bindingResult) The method is called when the form doesn't have any binding errors. It does a redirect to the FareSelection page- Parameters:
fareFinderForm- as the input FareFinderFormredirectModel-bindingResult-- Returns:
- a string representing the redirect to the FareSelection page
-
populateInitialData
protected void populateInitialData(org.springframework.ui.Model model) -
buildUrlParameters
-
initializeFareFinderForm
-
getMaxGuestQuantity
protected int getMaxGuestQuantity()- Specified by:
getMaxGuestQuantityin classAbstractFinderComponentController
-