Class AbstractFareValidationStrategy

java.lang.Object
de.hybris.platform.prosfacades.order.strategies.impl.AbstractFareValidationStrategy
All Implemented Interfaces:
FareValidationStrategy
Direct Known Subclasses:
AmendmentCartFareValidationStrategy, CartFareValidationStrategy

public abstract class AbstractFareValidationStrategy extends Object implements FareValidationStrategy
The Abstract implementation of FareValidationStrategy.
  • Constructor Details

    • AbstractFareValidationStrategy

      public AbstractFareValidationStrategy()
  • Method Details

    • validateNewPROSFareEntries

      protected void validateNewPROSFareEntries(AbstractOrderModel abstractOrder)
      Validate new pros fare entries.
      Parameters:
      abstractOrder - the abstract order
    • validateRepricedFares

      protected void validateRepricedFares(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> fareEntries)
      Validate repriced fares using repricer message.
      Parameters:
      abstractOrder - the abstract order
      fareEntries - the fare entries
    • validateFares

      protected void validateFares(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> fareEntries)
      Validate fares using intellipricer message.
      Parameters:
      abstractOrder - the abstract order
      fareEntries - the fare entries
    • getBookingSolution

      protected BookingSolution getBookingSolution(SearchResponseWrapper searchResponseWrapper)
      Gets booking solution.
      Parameters:
      searchResponseWrapper - the search response wrapper
      Returns:
      the booking solution
    • validateAmendedPROSFareEntries

      protected void validateAmendedPROSFareEntries(AbstractOrderModel abstractOrder)
      Validate amended pros fare entries.
      Parameters:
      abstractOrder - the abstract order
    • validateBasePrice

      protected void validateBasePrice(RepricerResponse repricerResponse, AbstractOrderEntryModel prosFareEntry)
      Validate base price.
      Parameters:
      repricerResponse - the repricer response
      prosFareEntry - the pros fare entry
    • isSameOriginDestination

      protected boolean isSameOriginDestination(List<OriginDestinationGroupPrice> originDestinationGroupPrices, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes)
      Checks if the origin destination in the repricer response is same as the one in the cart by comparing the flight details in the response with transport offerings in the cart
      Parameters:
      originDestinationGroupPrices - the origin destination group prices
      flightIdTransportOfferingMap - the flight id transport offering map
      transportOfferingCodes - the transport offering codes
      Returns:
      the boolean
    • isSameFlight

      protected boolean isSameFlight(List<Integer> flightIds, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes)
      Checks if the flight in the repricer response is same as the one in the cart.
      Parameters:
      flightIds - the flight ids
      flightIdTransportOfferingMap - the flight id transport offering map
      transportOfferingCodes - the transport offering codes
      Returns:
      the boolean
    • validateTotalSolutionPrice

      protected void validateTotalSolutionPrice(BookingSolution bookingSolution, List<AbstractOrderEntryModel> prosFareEntries)
      Validate total solution price.
      Parameters:
      bookingSolution - the booking solution
      prosFareEntries - the pros fare entries
    • getTotalFarePrice

      protected BigDecimal getTotalFarePrice(List<AbstractOrderEntryModel> prosFareEntries)
      Gets total fare price. If pricing is net, get total price plus taxes else gets total price.
      Parameters:
      prosFareEntries - the pros fare entries
      Returns:
      the total fare price
    • validateBasePrice

      protected void validateBasePrice(SearchResponseWrapper searchResponseWrapper, BookingSolution bookingSolution, AbstractOrderEntryModel prosFareEntry, String passengerTypeCode) throws TravelCartValidationException
      Validate total price.
      Parameters:
      searchResponseWrapper - the search response wrapper
      bookingSolution - the booking solution
      prosFareEntry - the pros fare entry
      passengerTypeCode - the passenger type code
      Throws:
      TravelCartValidationException - the travel cart validation exception
    • calculateBasePriceForSegment

      protected BigDecimal calculateBasePriceForSegment(SegmentPrice segmentPrice)
      Calculate base price for segment
      Parameters:
      segmentPrice - the segment price
      Returns:
      the base price
    • getPassengerTypeCode

      protected String getPassengerTypeCode(AbstractOrderEntryModel prosFareEntry) throws TravelCartValidationException
      Validate passenger type code.
      Parameters:
      prosFareEntry - the pros fare entry
      Returns:
      the passenger type code
      Throws:
      TravelCartValidationException - the travel cart validation exception
    • getSearchResponseWrapperFromIntelliPricer

      protected SearchResponseWrapper getSearchResponseWrapperFromIntelliPricer(AbstractOrderModel orderModel) throws TravelCartValidationException
      Gets search response wrapper.
      Parameters:
      orderModel - the cart model
      Returns:
      the search response wrapper
      Throws:
      TravelCartValidationException - the travel cart validation exception
    • getSearchResponseWrapperFromOriginalOrder

      protected SearchResponseWrapper getSearchResponseWrapperFromOriginalOrder(OrderModel orderModel)
      Gets search response wrapper from original order.
      Parameters:
      orderModel - the order model
      Returns:
      search response wrapper from original order
    • getRepricerResponseMessage

      protected RepricerResponseMessage getRepricerResponseMessage(AbstractOrderModel abstractOrder)
      Gets repricer response message.
      Parameters:
      abstractOrder - the abstract order
      Returns:
      the repricer response message
    • getTravelCartFacade

      protected TravelCartFacade getTravelCartFacade()
      Gets travel cart facade.
      Returns:
      the travel cart facade
    • setTravelCartFacade

      public void setTravelCartFacade(TravelCartFacade travelCartFacade)
      Sets travel cart facade.
      Parameters:
      travelCartFacade - the travel cart facade
    • getProsSearchResponseService

      protected PROSSearchResponseService getProsSearchResponseService()
      Gets pros search response service.
      Returns:
      the pros search response service
    • setProsSearchResponseService

      public void setProsSearchResponseService(PROSSearchResponseService prosSearchResponseService)
      Sets pros search response service.
      Parameters:
      prosSearchResponseService - the pros search response service
    • getCartToFarePriceMessageConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,FarePriceMessage> getCartToFarePriceMessageConverter()
      Gets cart to fare price message converter.
      Returns:
      the cart to fare price message converter
    • setCartToFarePriceMessageConverter

      public void setCartToFarePriceMessageConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,FarePriceMessage> cartToFarePriceMessageConverter)
      Sets cart to fare price message converter.
      Parameters:
      cartToFarePriceMessageConverter - the cart to fare price message converter
    • getFarePriceService

      protected FarePriceService getFarePriceService()
      Gets fare price service.
      Returns:
      the fare price service
    • setFarePriceService

      public void setFarePriceService(FarePriceService farePriceService)
      Sets fare price service.
      Parameters:
      farePriceService - the fare price service
    • getShoppingRepricingService

      protected ShoppingRepricingService getShoppingRepricingService()
      Gets shopping repricing service.
      Returns:
      the shopping repricing service
    • setShoppingRepricingService

      public void setShoppingRepricingService(ShoppingRepricingService shoppingRepricingService)
      Sets shopping repricing service.
      Parameters:
      shoppingRepricingService - the shopping repricing service
    • getProsTransportOfferingFacade

      protected PROSTransportOfferingFacade getProsTransportOfferingFacade()
      Gets pros transport offering facade.
      Returns:
      the pros transport offering facade
    • setProsTransportOfferingFacade

      public void setProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade)
      Sets pros transport offering facade.
      Parameters:
      prosTransportOfferingFacade - the pros transport offering facade
    • getRepricerChangeRequestPipelineManager

      protected RepricerRequestCreationPipelineManager getRepricerChangeRequestPipelineManager()
      Gets repricer change request pipeline manager.
      Returns:
      the repricer change request pipeline manager
    • setRepricerChangeRequestPipelineManager

      public void setRepricerChangeRequestPipelineManager(RepricerRequestCreationPipelineManager repricerChangeRequestPipelineManager)
      Sets repricer change request pipeline manager.
      Parameters:
      repricerChangeRequestPipelineManager - the repricer change request pipeline manager
    • getAbstractOrderToRepricingRequestDataConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,RepricingRequestData> getAbstractOrderToRepricingRequestDataConverter()
      Gets abstract order to repricing request data converter.
      Returns:
      the abstract order to repricing request data converter
    • setAbstractOrderToRepricingRequestDataConverter

      public void setAbstractOrderToRepricingRequestDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,RepricingRequestData> abstractOrderToRepricingRequestDataConverter)
      Sets abstract order to repricing request data converter.
      Parameters:
      abstractOrderToRepricingRequestDataConverter - the abstract order to repricing request data converter