Class ReservationPricingInfoHandler

java.lang.Object
de.hybris.platform.travelfacades.reservation.handlers.impl.ReservationPricingInfoHandler
All Implemented Interfaces:
ReservationHandler
Direct Known Subclasses:
PROSReservationPricingInfoHandler

public class ReservationPricingInfoHandler extends Object implements ReservationHandler
This handler is responsible for instantiating ReservationPricingInfo attribute of ReservationItem and attaching subtotal for each leg of the journey
  • Constructor Details

    • ReservationPricingInfoHandler

      public ReservationPricingInfoHandler()
  • Method Details

    • handle

      public void handle(AbstractOrderModel abstractOrderModel, ReservationData reservationData)
      Description copied from interface: ReservationHandler
      Handle method.
      Specified by:
      handle in interface ReservationHandler
      Parameters:
      abstractOrderModel - the abstract order model
      reservationData - 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 order
      reservationItem - the reservation item
    • getSegmentInfoData

      protected List<SegmentInfoData> getSegmentInfoData(AbstractOrderModel abstractOrderModel)
      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 order
      originDestinationRefNumber - - leg indicator
      Returns:
      total fare data
    • getPriceForAncillaryEntry

      protected double getPriceForAncillaryEntry(AbstractOrderEntryModel entry)
      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

      protected List<TaxData> createTaxData(List<de.hybris.platform.util.TaxValue> taxValues)
      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 protected PriceData createPriceData(double priceValue, String currencyIsoCode)
      Deprecated.
      Deprecated since version 3.0.
      Method to create a new PriceData Object using PriceDataFactory
      Parameters:
      priceValue - the price value
      currencyIsoCode - the currency iso code
      Returns:
      PriceData price data
    • createPriceData

      @Deprecated protected PriceData createPriceData(double priceValue)
      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 protected de.hybris.platform.servicelayer.i18n.CommonI18NService 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

      protected TravelCartService getTravelCartService()
      Gets travel cart service.
      Returns:
      the travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      Sets travel cart service.
      Parameters:
      travelCartService - the travelCartService to set
    • getTravelCommercePriceFacade

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Gets travel commerce price facade.
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      Sets travel commerce price facade.
      Parameters:
      travelCommercePriceFacade - the travelCommercePriceFacade to set