Class ReservationTotalFareHandler
java.lang.Object
de.hybris.platform.travelfacades.reservation.handlers.impl.ReservationTotalFareHandler
- All Implemented Interfaces:
ReservationHandler
- Direct Known Subclasses:
ReservationTotalPriceHandler
This handler is responsible for retrieving totals from abstract order and attaching them to reservation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PriceDatacalculateTotalToPay(AbstractOrderModel abstractOrderModel) Calculates difference between old total and amended total to know how much user should pay (or how much they should be refunded)protected List<DiscountData>createDiscountData(List<de.hybris.platform.util.DiscountValue> discountValues) Method to convert the Discount Values to Discount Data objects.protected FeeDatacreateFeeData(AbstractOrderEntryModel entryModel) Method to create Fee Data objects.protected PriceDatacreatePriceData(double priceValue, String currencyIsoCode) Deprecated.Deprecated since version 3.0.createTaxData(List<de.hybris.platform.util.TaxValue> taxValues) Method to convert the Tax Values to Tax Data objects.protected de.hybris.platform.store.services.BaseStoreServiceDeprecated.Deprecated since version 3.0.protected de.hybris.platform.servicelayer.i18n.CommonI18NServiceDeprecated.Deprecated since version 3.0.Gets order total paid for order entry type calculation strategy.protected de.hybris.platform.commercefacades.product.PriceDataFactoryDeprecated.Deprecated since version 3.0.protected TravelCartFacadeprotected TravelCommercePriceFacadeGets travel commerce price facade.voidhandle(AbstractOrderModel abstractOrderModel, ReservationData reservationData) Handle method.protected voidpopulateDiscounts(AbstractOrderModel abstractOrderModel, TotalFareData totalFare) Method to populate the discount objects and total discount value.protected voidpopulateFees(AbstractOrderModel abstractOrderModel, TotalFareData totalFare) Method to populate the fees objects and total fees.protected voidpopulateGlobalExtras(AbstractOrderModel abstractOrderModel, TotalFareData totalFare) Method to populate the globalExtras objects and total value.voidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) Deprecated.Deprecated since version 3.0.voidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) Deprecated.Deprecated since version 3.0.voidsetOrderTotalPaidForOrderEntryTypeCalculationStrategy(OrderTotalPaidForOrderEntryTypeCalculationStrategy orderTotalPaidForOrderEntryTypeCalculationStrategy) Sets order total paid for order entry type calculation strategy.voidsetPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.voidsetTravelCartFacade(TravelCartFacade travelCartFacade) voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
Constructor Details
-
ReservationTotalFareHandler
public ReservationTotalFareHandler()
-
-
Method Details
-
handle
Description copied from interface:ReservationHandlerHandle method.- Specified by:
handlein interfaceReservationHandler- Parameters:
abstractOrderModel- the abstract order modelreservationData- the reservation data
-
populateDiscounts
Method to populate the discount objects and total discount value.- Parameters:
abstractOrderModel- the abstract order modeltotalFare- the total fare
-
populateGlobalExtras
Method to populate the globalExtras objects and total value.- Parameters:
abstractOrderModel- the abstract order modeltotalFare- the total fare
-
populateFees
Method to populate the fees objects and total fees.- Parameters:
abstractOrderModel- the abstract order modeltotalFare- the total fare
-
createFeeData
Method to create Fee Data objects.- Parameters:
entryModel- the entry model- Returns:
- FeeData object.
-
createDiscountData
protected List<DiscountData> createDiscountData(List<de.hybris.platform.util.DiscountValue> discountValues) Method to convert the Discount Values to Discount Data objects.- Parameters:
discountValues- the discount values- Returns:
- list of DiscountData objects.
-
createTaxData
Method to convert the Tax Values to Tax Data objects.- Parameters:
taxValues- the tax values- Returns:
- list of TaxData objects.
-
createPriceData
Deprecated.Deprecated since version 3.0.Method to create a new PriceData Object using PriceDataFactory- Parameters:
priceValue- the price valuecurrencyIsoCode- the currency iso code- Returns:
- PriceData price data
-
calculateTotalToPay
Calculates difference between old total and amended total to know how much user should pay (or how much they should be refunded)- Parameters:
abstractOrderModel- the abstract order model- Returns:
- price to pay (or to be refunded)
-
getPriceDataFactory
@Deprecated protected de.hybris.platform.commercefacades.product.PriceDataFactory getPriceDataFactory()Deprecated.Deprecated since version 3.0.Gets price data factory.- Returns:
- the priceDataFactory
-
setPriceDataFactory
@Deprecated public void setPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.Sets price data factory.- Parameters:
priceDataFactory- the priceDataFactory to set
-
getCommonI18NService
Deprecated.Deprecated since version 3.0.Gets common i 18 n service.- Returns:
- the commonI18NService
-
setCommonI18NService
@Deprecated public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) Deprecated.Deprecated since version 3.0.Sets common i 18 n service.- Parameters:
commonI18NService- the commonI18NService to set
-
getBaseStoreService
Deprecated.Deprecated since version 3.0.Gets base store service.- Returns:
- the baseStoreService
-
setBaseStoreService
@Deprecated public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) Deprecated.Deprecated since version 3.0.Sets base store service.- Parameters:
baseStoreService- the baseStoreService to set
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
getTravelCartFacade
- Returns:
- the travelCartFacade
-
setTravelCartFacade
- Parameters:
travelCartFacade- the travelCartFacade to set
-
getOrderTotalPaidForOrderEntryTypeCalculationStrategy
protected OrderTotalPaidForOrderEntryTypeCalculationStrategy getOrderTotalPaidForOrderEntryTypeCalculationStrategy()Gets order total paid for order entry type calculation strategy.- Returns:
- the order total paid for order entry type calculation strategy
-
setOrderTotalPaidForOrderEntryTypeCalculationStrategy
public void setOrderTotalPaidForOrderEntryTypeCalculationStrategy(OrderTotalPaidForOrderEntryTypeCalculationStrategy orderTotalPaidForOrderEntryTypeCalculationStrategy) Sets order total paid for order entry type calculation strategy.- Parameters:
orderTotalPaidForOrderEntryTypeCalculationStrategy- the order total paid for order entry type calculation strategy
-