Class OldTicketItineraryRepricerRequestPopulationHandler

java.lang.Object
de.hybris.platform.prosfacades.repricer.handler.impl.OldTicketItineraryRepricerRequestPopulationHandler
All Implemented Interfaces:
RepricerRequestPopulationHandler

public class OldTicketItineraryRepricerRequestPopulationHandler extends Object implements RepricerRequestPopulationHandler
This class populates the ticket itinerary information to the RepricerRequest.
  • Constructor Details

    • OldTicketItineraryRepricerRequestPopulationHandler

      public OldTicketItineraryRepricerRequestPopulationHandler()
  • Method Details

    • handle

      public void handle(AbstractOrderModel order, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest)
      Description copied from interface: RepricerRequestPopulationHandler
      Populates RepricerRequest using data from order and repricing request data.
      Specified by:
      handle in interface RepricerRequestPopulationHandler
      Parameters:
      order - the order
      repricingRequestData - the repricing request data
      repricerRequest - the repricer request
    • calculateReissueOccurrence

      protected int calculateReissueOccurrence(int reissueOccurrenceNumber, AbstractOrderModel orderModel)
      Calculates the Reissue Occurrence Number. This number indicates the number of times the order has been reissued through Repricing request.
      Parameters:
      reissueOccurrenceNumber - the reissue occurrence number
      orderModel - the order model
      Returns:
      the int
    • getPassengerIdMapping

      protected Map<Integer,Passenger> getPassengerIdMapping(AbstractOrderModel order, List<String> repricerPassengers)
      Creates the mapping between pros traveller id and passenger.
      Parameters:
      order - the order
      repricerPassengers - the repricer passengers
      Returns:
      the mapping between pros traveller id and passenger
    • getFlights

      protected List<RepricerFlight> getFlights(PROSSearchResponse prosSearchResponse, AbstractOrderModel order, Integer solutionId)
      Creates the mapping between pros flight id and transport offering code.
      Parameters:
      prosSearchResponse - the pros search response
      order - the order
      solutionId - the solution id
      Returns:
      the mapping between pros flight id and transport offering code
    • getFares

      protected List<TktItineraryFare> getFares(PROSSearchResponse prosSearchResponse, Set<Integer> passengersIds, Set<Integer> flightIds)
      Creates the list of fares for repricer request.
      Parameters:
      prosSearchResponse - the pros search response
      passengersIds - the set of pros passenger ids
      flightIds - the set of pros flight ids
      Returns:
      the list of fares for repricer request
    • distinctByCode

      protected static <T> Predicate<T> distinctByCode(Function<? super T,?> codeExtractor)
      Filter used for filtering all the objects having duplicated code.
      Type Parameters:
      T - the type parameter
      Parameters:
      codeExtractor - the code extractor
      Returns:
      the predicate
    • 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
    • getPassengerCodeToPTCMapping

      protected Map<String,String> getPassengerCodeToPTCMapping()
      Gets passenger code to ptc mapping.
      Returns:
      the passenger code to ptc mapping
    • setPassengerCodeToPTCMapping

      public void setPassengerCodeToPTCMapping(Map<String,String> passengerCodeToPTCMapping)
      Sets passenger code to ptc mapping.
      Parameters:
      passengerCodeToPTCMapping - the passenger code to ptc mapping
    • getProsTransportOfferingService

      protected PROSTransportOfferingService getProsTransportOfferingService()
      Gets pros transport offering service.
      Returns:
      the pros transport offering service
    • setProsTransportOfferingService

      public void setProsTransportOfferingService(PROSTransportOfferingService prosTransportOfferingService)
      Sets pros transport offering service.
      Parameters:
      prosTransportOfferingService - the pros transport offering service
    • getBookingService

      protected BookingService getBookingService()
      Gets booking service.
      Returns:
      the booking service
    • setBookingService

      public void setBookingService(BookingService bookingService)
      Sets booking service.
      Parameters:
      bookingService - the booking service