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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcalculateReissueOccurrence(int reissueOccurrenceNumber, AbstractOrderModel orderModel) Calculates the Reissue Occurrence Number.protected static <T> Predicate<T>distinctByCode(Function<? super T, ?> codeExtractor) Filter used for filtering all the objects having duplicated code.protected BookingServiceGets booking service.protected List<TktItineraryFare>Creates the list of fares for repricer request.protected List<RepricerFlight>getFlights(PROSSearchResponse prosSearchResponse, AbstractOrderModel order, Integer solutionId) Creates the mapping between pros flight id and transport offering code.Gets passenger code to ptc mapping.getPassengerIdMapping(AbstractOrderModel order, List<String> repricerPassengers) Creates the mapping between pros traveller id and passenger.protected PROSSearchResponseServiceGets pros search response service.protected PROSTransportOfferingServiceGets pros transport offering service.voidhandle(AbstractOrderModel order, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest) PopulatesRepricerRequestusing data from order and repricing request data.voidsetBookingService(BookingService bookingService) Sets booking service.voidsetPassengerCodeToPTCMapping(Map<String, String> passengerCodeToPTCMapping) Sets passenger code to ptc mapping.voidsetProsSearchResponseService(PROSSearchResponseService prosSearchResponseService) Sets pros search response service.voidsetProsTransportOfferingService(PROSTransportOfferingService prosTransportOfferingService) Sets pros transport offering service.
-
Constructor Details
-
OldTicketItineraryRepricerRequestPopulationHandler
public OldTicketItineraryRepricerRequestPopulationHandler()
-
-
Method Details
-
handle
public void handle(AbstractOrderModel order, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest) Description copied from interface:RepricerRequestPopulationHandlerPopulatesRepricerRequestusing data from order and repricing request data.- Specified by:
handlein interfaceRepricerRequestPopulationHandler- Parameters:
order- the orderrepricingRequestData- the repricing request datarepricerRequest- 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 numberorderModel- 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 orderrepricerPassengers- 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 responseorder- the ordersolutionId- 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 responsepassengersIds- the set of pros passenger idsflightIds- the set of pros flight ids- Returns:
- the list of fares for repricer request
-
distinctByCode
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
Gets pros search response service.- Returns:
- the pros search response service
-
setProsSearchResponseService
Sets pros search response service.- Parameters:
prosSearchResponseService- the pros search response service
-
getPassengerCodeToPTCMapping
Gets passenger code to ptc mapping.- Returns:
- the passenger code to ptc mapping
-
setPassengerCodeToPTCMapping
Sets passenger code to ptc mapping.- Parameters:
passengerCodeToPTCMapping- the passenger code to ptc mapping
-
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
Gets booking service.- Returns:
- the booking service
-
setBookingService
Sets booking service.- Parameters:
bookingService- the booking service
-