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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimalcalculateBasePriceForSegment(SegmentPrice segmentPrice) Calculate base price for segmentprotected de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,RepricingRequestData> Gets abstract order to repricing request data converter.protected BookingSolutiongetBookingSolution(SearchResponseWrapper searchResponseWrapper) Gets booking solution.protected de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel,FarePriceMessage> Gets cart to fare price message converter.protected FarePriceServiceGets fare price service.protected StringgetPassengerTypeCode(AbstractOrderEntryModel prosFareEntry) Validate passenger type code.protected PROSSearchResponseServiceGets pros search response service.protected PROSTransportOfferingFacadeGets pros transport offering facade.protected RepricerRequestCreationPipelineManagerGets repricer change request pipeline manager.protected RepricerResponseMessagegetRepricerResponseMessage(AbstractOrderModel abstractOrder) Gets repricer response message.protected SearchResponseWrapperGets search response wrapper.protected SearchResponseWrappergetSearchResponseWrapperFromOriginalOrder(OrderModel orderModel) Gets search response wrapper from original order.protected ShoppingRepricingServiceGets shopping repricing service.protected BigDecimalgetTotalFarePrice(List<AbstractOrderEntryModel> prosFareEntries) Gets total fare price.protected TravelCartFacadeGets travel cart facade.protected booleanisSameFlight(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.protected booleanisSameOriginDestination(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 cartvoidsetAbstractOrderToRepricingRequestDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel, RepricingRequestData> abstractOrderToRepricingRequestDataConverter) Sets abstract order to repricing request data converter.voidsetCartToFarePriceMessageConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderModel, FarePriceMessage> cartToFarePriceMessageConverter) Sets cart to fare price message converter.voidsetFarePriceService(FarePriceService farePriceService) Sets fare price service.voidsetProsSearchResponseService(PROSSearchResponseService prosSearchResponseService) Sets pros search response service.voidsetProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade) Sets pros transport offering facade.voidsetRepricerChangeRequestPipelineManager(RepricerRequestCreationPipelineManager repricerChangeRequestPipelineManager) Sets repricer change request pipeline manager.voidsetShoppingRepricingService(ShoppingRepricingService shoppingRepricingService) Sets shopping repricing service.voidsetTravelCartFacade(TravelCartFacade travelCartFacade) Sets travel cart facade.protected voidvalidateAmendedPROSFareEntries(AbstractOrderModel abstractOrder) Validate amended pros fare entries.protected voidvalidateBasePrice(RepricerResponse repricerResponse, AbstractOrderEntryModel prosFareEntry) Validate base price.protected voidvalidateBasePrice(SearchResponseWrapper searchResponseWrapper, BookingSolution bookingSolution, AbstractOrderEntryModel prosFareEntry, String passengerTypeCode) Validate total price.protected voidvalidateFares(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> fareEntries) Validate fares using intellipricer message.protected voidvalidateNewPROSFareEntries(AbstractOrderModel abstractOrder) Validate new pros fare entries.protected voidvalidateRepricedFares(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> fareEntries) Validate repriced fares using repricer message.protected voidvalidateTotalSolutionPrice(BookingSolution bookingSolution, List<AbstractOrderEntryModel> prosFareEntries) Validate total solution price.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.prosfacades.order.strategies.FareValidationStrategy
validate
-
Constructor Details
-
AbstractFareValidationStrategy
public AbstractFareValidationStrategy()
-
-
Method Details
-
validateNewPROSFareEntries
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 orderfareEntries- the fare entries
-
validateFares
protected void validateFares(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> fareEntries) Validate fares using intellipricer message.- Parameters:
abstractOrder- the abstract orderfareEntries- the fare entries
-
getBookingSolution
Gets booking solution.- Parameters:
searchResponseWrapper- the search response wrapper- Returns:
- the booking solution
-
validateAmendedPROSFareEntries
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 responseprosFareEntry- 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 pricesflightIdTransportOfferingMap- the flight id transport offering maptransportOfferingCodes- 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 idsflightIdTransportOfferingMap- the flight id transport offering maptransportOfferingCodes- the transport offering codes- Returns:
- the boolean
-
validateTotalSolutionPrice
protected void validateTotalSolutionPrice(BookingSolution bookingSolution, List<AbstractOrderEntryModel> prosFareEntries) Validate total solution price.- Parameters:
bookingSolution- the booking solutionprosFareEntries- the pros fare entries
-
getTotalFarePrice
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 wrapperbookingSolution- the booking solutionprosFareEntry- the pros fare entrypassengerTypeCode- the passenger type code- Throws:
TravelCartValidationException- the travel cart validation exception
-
calculateBasePriceForSegment
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
Gets search response wrapper from original order.- Parameters:
orderModel- the order model- Returns:
- search response wrapper from original order
-
getRepricerResponseMessage
Gets repricer response message.- Parameters:
abstractOrder- the abstract order- Returns:
- the repricer response message
-
getTravelCartFacade
Gets travel cart facade.- Returns:
- the travel cart facade
-
setTravelCartFacade
Sets travel cart facade.- Parameters:
travelCartFacade- the travel cart facade
-
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
-
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
Gets fare price service.- Returns:
- the fare price service
-
setFarePriceService
Sets fare price service.- Parameters:
farePriceService- the fare price service
-
getShoppingRepricingService
Gets shopping repricing service.- Returns:
- the shopping repricing service
-
setShoppingRepricingService
Sets shopping repricing service.- Parameters:
shoppingRepricingService- the shopping repricing service
-
getProsTransportOfferingFacade
Gets pros transport offering facade.- Returns:
- the pros transport offering facade
-
setProsTransportOfferingFacade
Sets pros transport offering facade.- Parameters:
prosTransportOfferingFacade- the pros transport offering facade
-
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
-