Class ShoppingReservationComponentController
java.lang.Object
de.hybris.platform.addonsupport.controllers.AbstractAddOnController
de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController<T>
de.hybris.platform.travelacceleratorstorefront.controllers.cms.SubstitutingCMSAddOnComponentController<ShoppingReservationComponentModel>
de.hybris.platform.shoppingaddon.controllers.cms.ShoppingReservationComponentController
@Controller("ShoppingReservationComponentController")
@RequestMapping("/view/ShoppingReservationComponentController")
public class ShoppingReservationComponentController
extends SubstitutingCMSAddOnComponentController<ShoppingReservationComponentModel>
Controller for Transport Reservation 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
Fields 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 voidcreatePTCBreakdownSummary(List<PTCFareBreakdownData> ptcBreakdownsSummary, List<PTCFareBreakdownData> ptcFareBreakdownDatas) Creates a new instances of PTC breakdowns which will store the summary of fare breakdowns from all legsprotected voidfillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, ShoppingReservationComponentModel component) protected StringgetComponent(String componentUid, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) This method is responsible for populating itinerary component after see full reservation button is clickedprotected PriceDatagetDiscountsSummary(ReservationData reservationData) Sums up values of all discounts to be displayed in itinerary summary sectionprotected PriceDatagetExtrasSummary(ReservationData reservationData) Sums up prices of all extras selected by user which will be displayed in itinerary summary section.protected List<PTCFareBreakdownData>getPTCBreakdownSummary(ReservationData reservationData) Sums up PTC breakdowns from all legs which will be displayed in itinerary summary sectionprotected PriceDatagetTaxesFeesSummary(ReservationData reservationData) Sums up values of all taxes and fees to be displayed in itinerary summary sectionprotected BigDecimalgetTotalFees(List<FeeData> fees) Sums up all fees from the reservationprotected BigDecimalgetTotalTaxes(List<TaxData> taxes) Sums up all taxes from the reservationprotected voidpopulateModel(org.springframework.ui.Model model) protected voidupdatePTCBreakdowns(List<PTCFareBreakdownData> ptcBreakdowns, List<PTCFareBreakdownData> newPtcFareBreakdowns) Updates already existing PTC breakdown with values from next reservation itemMethods 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
-
Constructor Details
-
ShoppingReservationComponentController
public ShoppingReservationComponentController()
-
-
Method Details
-
fillModel
protected void fillModel(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model, ShoppingReservationComponentModel component) - Specified by:
fillModelin classde.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController<ShoppingReservationComponentModel>
-
getComponent
@RequestMapping(value="/load", method=GET) protected String getComponent(@RequestParam String componentUid, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) This method is responsible for populating itinerary component after see full reservation button is clicked- Parameters:
componentUid-request-response-model-- Returns:
-
populateModel
protected void populateModel(org.springframework.ui.Model model) -
getDiscountsSummary
Sums up values of all discounts to be displayed in itinerary summary section- Parameters:
reservationData- - the reservation- Returns:
- total value of discounts
-
getTaxesFeesSummary
Sums up values of all taxes and fees to be displayed in itinerary summary section- Parameters:
reservationData- - the reservation- Returns:
- total value of taxes and fees
-
getTotalFees
Sums up all fees from the reservation- Parameters:
fees- - fees attached to reservation object- Returns:
- total value of fees
-
getTotalTaxes
Sums up all taxes from the reservation- Parameters:
taxes- - fees attached to reservation object- Returns:
-
getExtrasSummary
Sums up prices of all extras selected by user which will be displayed in itinerary summary section.- Parameters:
reservationData- - current reservation object- Returns:
- total price of all extras
-
getPTCBreakdownSummary
Sums up PTC breakdowns from all legs which will be displayed in itinerary summary section- Parameters:
reservationData- - current reservation object- Returns:
- summary of PTC breakdowns for all legs
-
createPTCBreakdownSummary
protected void createPTCBreakdownSummary(List<PTCFareBreakdownData> ptcBreakdownsSummary, List<PTCFareBreakdownData> ptcFareBreakdownDatas) Creates a new instances of PTC breakdowns which will store the summary of fare breakdowns from all legs- Parameters:
ptcBreakdownsSummary- - list of PTC breakdowns which will be displayed in itinerary summaryptcFareBreakdownDatas- - list of PTC breakdowns from current reservation item
-
updatePTCBreakdowns
protected void updatePTCBreakdowns(List<PTCFareBreakdownData> ptcBreakdowns, List<PTCFareBreakdownData> newPtcFareBreakdowns) Updates already existing PTC breakdown with values from next reservation item- Parameters:
ptcBreakdowns- - list of PTC breakdowns which will be displayed in itinerary summarynewPtcFareBreakdowns- - list of PTC breakdowns from next reservation item
-