Class ReservationPricingInfoHandler
java.lang.Object
de.hybris.platform.travelfacades.reservation.handlers.impl.ReservationPricingInfoHandler
- All Implemented Interfaces:
ReservationHandler
- Direct Known Subclasses:
PROSReservationPricingInfoHandler
This handler is responsible for instantiating ReservationPricingInfo attribute of ReservationItem and attaching
subtotal for each leg of the journey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TotalFareDatacalculateSubtotalForLeg(AbstractOrderModel abstractOrderModel, int originDestinationRefNumber) Sums up all prices of Abstract Order Entries which are associated with given legprotected List<DiscountData>createDiscountData(List<de.hybris.platform.util.DiscountValue> discountValues) Method to convert the Discount Values to Discount Data objects.protected PriceDatacreatePriceData(double priceValue) Deprecated.Deprecated since version 3.0.protected PriceDatacreatePriceData(double priceValue, String currencyIsoCode) Deprecated.Deprecated since version 3.0.protected voidcreateReservationPricingInfo(AbstractOrderModel abstractOrderModel, ReservationItemData reservationItem) Creates a new Reservation Pricing Info for given Reservation ItemcreateTaxData(List<de.hybris.platform.util.TaxValue> taxValues) Method to convert the Tax Values to Tax Data objects.protected de.hybris.platform.servicelayer.i18n.CommonI18NServiceDeprecated.Deprecated since version 3.0.protected de.hybris.platform.commercefacades.product.PriceDataFactoryDeprecated.Deprecated since version 3.0.protected doubleMethod to get the price from an order entry.protected List<SegmentInfoData>getSegmentInfoData(AbstractOrderModel abstractOrderModel) creates and returns SegmentInfoData from fareProductEntries present in abstractOrderModelprotected TravelCartServiceGets travel cart service.protected TravelCommercePriceFacadeGets travel commerce price facade.voidhandle(AbstractOrderModel abstractOrderModel, ReservationData reservationData) Handle method.voidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) Deprecated.Deprecated since version 3.0.voidsetPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.voidsetTravelCartService(TravelCartService travelCartService) Sets travel cart service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
Constructor Details
-
ReservationPricingInfoHandler
public ReservationPricingInfoHandler()
-
-
Method Details
-
handle
Description copied from interface:ReservationHandlerHandle method.- Specified by:
handlein interfaceReservationHandler- Parameters:
abstractOrderModel- the abstract order modelreservationData- the reservation data
-
createReservationPricingInfo
protected void createReservationPricingInfo(AbstractOrderModel abstractOrderModel, ReservationItemData reservationItem) Creates a new Reservation Pricing Info for given Reservation Item- Parameters:
abstractOrderModel- - given abstract orderreservationItem- the reservation item
-
getSegmentInfoData
creates and returns SegmentInfoData from fareProductEntries present in abstractOrderModel- Parameters:
abstractOrderModel- - given abstract order- Returns:
- list of SegmentInfoData
-
calculateSubtotalForLeg
protected TotalFareData calculateSubtotalForLeg(AbstractOrderModel abstractOrderModel, int originDestinationRefNumber) Sums up all prices of Abstract Order Entries which are associated with given leg- Parameters:
abstractOrderModel- - given abstract orderoriginDestinationRefNumber- - leg indicator- Returns:
- total fare data
-
getPriceForAncillaryEntry
Method to get the price from an order entry. Cancellation scenario is handled here where the quantity is 0. For entries that has more than 1 quantity, the price should be base price * quantity as the change product price rule could affect the total price. For cancelled entries, either base price or total price is picked because the quantity is 0.- Parameters:
entry- the entry- Returns:
- the price for ancillary entry
-
createTaxData
Method to convert the Tax Values to Tax Data objects.- Parameters:
taxValues- the tax values- Returns:
- list of TaxData objects.
-
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.
-
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
-
createPriceData
Deprecated.Deprecated since version 3.0.Method to create a new PriceData Object using PriceDataFactory- Parameters:
priceValue- the price value- Returns:
- PriceData price data
-
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
-
getTravelCartService
Gets travel cart service.- Returns:
- the travelCartService
-
setTravelCartService
Sets travel cart service.- Parameters:
travelCartService- the travelCartService to set
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-