Class PROSFlightItineraryHandler

java.lang.Object
de.hybris.platform.prosfacades.fare.search.handlers.impl.PROSFlightItineraryHandler
All Implemented Interfaces:
ShoppingFlightSearchHandler

public class PROSFlightItineraryHandler extends Object implements ShoppingFlightSearchHandler
The type Pros Flight itinerary handler populates the flight search response with the itinerary details.
  • Constructor Details

    • PROSFlightItineraryHandler

      public PROSFlightItineraryHandler()
  • Method Details

    • handle

      public void handle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FlightSearchResponseData flightSearchResponseData, Map<String,TransportOfferingData> transportOfferingDataMap, Map<Integer,String> flightIdCodeMap, FlightSearchRequestData flightSearchRequestData)
      Description copied from interface: ShoppingFlightSearchHandler
      Handle method
      Specified by:
      handle in interface ShoppingFlightSearchHandler
      Parameters:
      searchResponseMessage - the search response message
      fareShopMessage - the fare shop message
      flightSearchResponseData - the flightSearchResponseData
      transportOfferingDataMap - the transportOfferingDataMap
      flightIdCodeMap - the flightIdCodeMap
      flightSearchRequestData - the flight search request data
    • populatePassengersData

      protected void populatePassengersData(OneSearchMessage oneSearchMessage, FlightSearchResponseData flightSearchResponseData)
      Populate the passenger data
      Parameters:
      oneSearchMessage - the one search message
      flightSearchResponseData - the flight search response data
    • populateFlightItinerary

      protected void populateFlightItinerary(PROSSearchResponse prosSearchResponse, Map<String,TransportOfferingData> transportOfferingDataMap, FlightSearchResponseData flightSearchResponseData, Map<Integer,String> flightIdCodeMap)
      Method populates the flight itinerary
      Parameters:
      prosSearchResponse - pros search response
      transportOfferingDataMap - transporting offering data map
      flightSearchResponseData - the flight search response data
      flightIdCodeMap - the flight id code map
    • createFlightGroup

      protected void createFlightGroup(Map<String,TransportOfferingData> transportOfferingDataMap, List<FlightGroupData> flightGroupDataList, FlightGroup flightGroup)
      Create flight group data
      Parameters:
      transportOfferingDataMap - map of transport offering key and data
      flightGroupDataList - list of flight groups to be populated
      flightGroup - flight group from the response
    • createDataForFlightGroup

      protected void createDataForFlightGroup(List<Flight> flights, Map<String,TransportOfferingData> transportOfferingDataMap, List<FlightData> flightDataList, List<AircraftData> aircraftList, List<AirportData> airportList, List<CarrierData> carrierList, Map<Integer,String> flightIdCodeMap)
      Add flights for the flight group
      Parameters:
      flights - all flights in flight group
      transportOfferingDataMap - transport Offering Data Map
      flightDataList - the flight data list for response
      aircraftList - the aircraft data list for response
      airportList - the airport data list for response
      carrierList - the carrier list
      flightIdCodeMap - the flight id code map
    • createFlightData

      protected void createFlightData(List<FlightData> flightDataList, Map<Integer,String> flightIdCodeMap, Flight flight, TransportOfferingData transportOfferingData)
      Create the flight data list
      Parameters:
      flightDataList - the flight data list
      flightIdCodeMap - flight id and code map
      flight - flight details
      transportOfferingData - the transport offering data
    • addAircraftDetails

      protected void addAircraftDetails(TransportOfferingData transportOfferingData, List<AircraftData> aircraftList)
      Add the aircraft details
      Parameters:
      transportOfferingData - the transport offering data
      aircraftList - the aircraft list
    • addAirportDetails

      protected void addAirportDetails(TransportOfferingData transportOfferingData, List<AirportData> airportList)
      Add the airport details
      Parameters:
      transportOfferingData - the transport offering data
      airportList - the airport list
    • addCarrierDetails

      protected void addCarrierDetails(TransportOfferingData transportOfferingData, List<CarrierData> carrierList)
      Add the carrier details
      Parameters:
      transportOfferingData - the transport offering data
      carrierList - the carrier list
    • getFlightReferenceCodes

      protected List<String> getFlightReferenceCodes(List<Flight> flights, Map<String,TransportOfferingData> transportOfferingDataMap)
      Get the reference code for the flight
      Parameters:
      flights - flight data
      transportOfferingDataMap - transport offering data
      Returns:
      flight reference codes
    • checkIfFlightExists

      protected boolean checkIfFlightExists(List<Flight> flights, Map<String,TransportOfferingData> transportOfferingDataMap)
      check if the flight exist
      Parameters:
      flights - flights from pros response
      transportOfferingDataMap - map of the transport offerings available in the system
      Returns:
      boolean
    • getKeyForTransportOffering

      protected String getKeyForTransportOffering(Flight flight)
      Creates the key to fetch the transport offering data
      Parameters:
      flight - the flight details
      Returns:
    • getPaxToPassengerCodeTypeMapping

      protected Map<String,String> getPaxToPassengerCodeTypeMapping()
      Gets pax to passenger code type mapping.
      Returns:
      the pax to passenger code type mapping
    • setPaxToPassengerCodeTypeMapping

      public void setPaxToPassengerCodeTypeMapping(Map<String,String> paxToPassengerCodeTypeMapping)
      Sets pax to passenger code type mapping.
      Parameters:
      paxToPassengerCodeTypeMapping - the pax to passenger code type mapping