Class DefaultNDCTravelCommercePriceFacade
java.lang.Object
de.hybris.platform.travelfacades.facades.impl.DefaultTravelCommercePriceFacade
de.hybris.platform.ndc182facades.facades.impl.DefaultNDCTravelCommercePriceFacade
- All Implemented Interfaces:
NDCTravelCommercePriceFacade,TravelCommercePriceFacade
public class DefaultNDCTravelCommercePriceFacade
extends DefaultTravelCommercePriceFacade
implements NDCTravelCommercePriceFacade
The ndc 18.2 implementation of
NDCTravelCommercePriceFacade interface. This class extends the
DefaultTravelCommercePriceFacade in order to use all the methods for retrieving the price informations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateTax(String transportOfferingCode, Map<String, String> transportOfferingCountryCodeMap, ProductModel productModel, Map<String, Double> productCodeBaseFareMap) Method to calculate tax for givenProductModel,TransportOfferingModeland passengerTypecalculateTaxForExtras(BundleTemplateModel ancillaryBundleTemplateModel, Map<String, Double> productCodeBaseFareMap, List<String> transportOfferings) Method to calculate tax for every product included in bundle.calculateTaxForProduct(ProductModel productModel, Map<String, String> transportOfferingCountryCodeMap, List<String> transportOfferings, Map<String, Double> productCodeBaseFareMap) Method to calculate tax for every product on the basis of whether given product is per transportOfferingCode or per route.calculateTaxSummaries(List<ProductModel> fareProducts, List<BundleTemplateModel> includedAncillaries, int ptcQty, Map<String, Double> productCodeBaseFareMap, List<String> transportOfferings) Calculates tax summaries.protected booleancheckIfProductPerTO(ProductModel productModel) Returns true if givenProductDatais per transport offering otherwise false.createPriceValue(Double priceData, List<de.hybris.platform.jalo.order.price.TaxInformation> taxInfos) Method to convert the Tax Information to Tax Data objects.protected de.hybris.platform.commerceservices.product.CommerceProductServiceGets commerce product service.protected NDCPassengerTypeServiceGets ndc passenger type service.Gets offer group to origin destination mapping.protected de.hybris.platform.servicelayer.session.SessionServiceGets session service.getTaxesForProduct(List<ProductModel> fareProducts, Map<String, Double> productCodeBaseFareMap) Method to retrieve taxes for the product based on transportFacility, country and passenger type.protected TransportFacilityFacadeGets transport facility facade.voidpopulatePricesForMultiSectorBundle(List<ProductModel> fareProducts, List<BundleTemplateModel> includedAncillaries, String routeCode, Map<String, Double> productCodeBaseFareMap) Populates prices for multi sector bundle.voidpopulatePricesForPointToPointBundle(List<ProductModel> fareProducts, List<BundleTemplateModel> ancillaryBundles, String routeCode, List<String> transportOfferings, Map<String, Double> productCodeBaseFareMap) Populates prices for point to point bundle.protected voidpopulateProductPrices(List<ProductModel> productList, String searchKey, String searchValue, BundleTemplateModel bundleTemplate, Map<String, Double> productCodeBaseFareMap) This method populates the price information for all the fare products and ancillary products.protected voidpopulateProductPricesForOptions(List<ProductModel> productList, String transportOfferingCode, String sectorCode, String routeCode, BundleTemplateModel bundleTemplate, Map<String, Double> productCodeBaseFareMap) Populates product prices for options.voidsetCommerceProductService(de.hybris.platform.commerceservices.product.CommerceProductService commerceProductService) Sets commerce product service.voidsetNdcPassengerTypeService(NDCPassengerTypeService ndcPassengerTypeService) Sets ndc passenger type service.voidsetOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Sets offer group to origin destination mapping.voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.voidsetTaxSearchCriteria(List<String> transportOfferingCodes, String ptc) Sets tax search criteria.voidsetTransportFacilityFacade(TransportFacilityFacade transportFacilityFacade) Methods inherited from class de.hybris.platform.travelfacades.facades.impl.DefaultTravelCommercePriceFacade
addPropertyPriceLevelToCartEntry, createPriceData, createPriceData, createPriceData, createPriceData, createPriceData, createPriceData, createPriceData, getBookingFeesAndTaxes, getBundleRuleService, getCommonI18NService, getConfigurationService, getDueAmount, getPaidAmount, getPriceDataFactory, getPriceInformation, getPriceInformation, getPriceInformationByHierarchy, getPriceInformationByProductPriceBundleRule, getPriceLevelInfo, getPriceLevelInfoByHierarchy, getPriceLookupAttributes, getProductService, getTransportOfferingFacade, getTransportOfferingService, getTravelCommercePriceService, getTravelRulesService, isNetPriceProduct, isPriceInformationAvailable, setBundleRuleService, setCommonI18NService, setConfigurationService, setPriceAndTaxSearchCriteriaInContext, setPriceAndTaxSearchCriteriaInContext, setPriceDataFactory, setPriceSearchCriteriaInContext, setProductService, setTaxSearchCriteriaInContext, setTransportOfferingFacade, setTransportOfferingService, setTravelCommercePriceService, setTravelRulesService
-
Constructor Details
-
DefaultNDCTravelCommercePriceFacade
public DefaultNDCTravelCommercePriceFacade()
-
-
Method Details
-
populatePricesForMultiSectorBundle
public void populatePricesForMultiSectorBundle(List<ProductModel> fareProducts, List<BundleTemplateModel> includedAncillaries, String routeCode, Map<String, Double> productCodeBaseFareMap) Populates prices for multi sector bundle.- Specified by:
populatePricesForMultiSectorBundlein interfaceNDCTravelCommercePriceFacade- Parameters:
fareProducts- the fare productsincludedAncillaries- the included ancillariesrouteCode- the route codeproductCodeBaseFareMap- the productCodeBaseFareMap
-
populatePricesForPointToPointBundle
public void populatePricesForPointToPointBundle(List<ProductModel> fareProducts, List<BundleTemplateModel> ancillaryBundles, String routeCode, List<String> transportOfferings, Map<String, Double> productCodeBaseFareMap) Populates prices for point to point bundle.- Specified by:
populatePricesForPointToPointBundlein interfaceNDCTravelCommercePriceFacade- Parameters:
fareProducts- the fare productsancillaryBundles- the ancillary bundlesrouteCode- the route codetransportOfferings- the transportOfferingsproductCodeBaseFareMap- the productCodeBaseFareMap
-
populateProductPricesForOptions
protected void populateProductPricesForOptions(List<ProductModel> productList, String transportOfferingCode, String sectorCode, String routeCode, BundleTemplateModel bundleTemplate, Map<String, Double> productCodeBaseFareMap) Populates product prices for options.- Parameters:
productList- the product listtransportOfferingCode- the transport offering codesectorCode- the sector coderouteCode- the route codebundleTemplate- the bundle templateproductCodeBaseFareMap- the productCodeBaseFareMap
-
populateProductPrices
protected void populateProductPrices(List<ProductModel> productList, String searchKey, String searchValue, BundleTemplateModel bundleTemplate, Map<String, Double> productCodeBaseFareMap) This method populates the price information for all the fare products and ancillary products. The prices are searched for the search key and search value.- Parameters:
productList- the product listsearchKey- the search keysearchValue- the search valuebundleTemplate- the bundleTemplateproductCodeBaseFareMap- the productCodeBaseFareMap
-
calculateTaxSummaries
public List<TaxData> calculateTaxSummaries(List<ProductModel> fareProducts, List<BundleTemplateModel> includedAncillaries, int ptcQty, Map<String, Double> productCodeBaseFareMap, List<String> transportOfferings) Calculates tax summaries.- Specified by:
calculateTaxSummariesin interfaceNDCTravelCommercePriceFacade- Parameters:
fareProducts- the fare productsincludedAncillaries- the included ancillariesptcQty- the ptc qtyproductCodeBaseFareMap- the productCodeBaseFareMaptransportOfferings- the transportOfferings- Returns:
- the list
-
setTaxSearchCriteria
Sets tax search criteria.- Specified by:
setTaxSearchCriteriain interfaceNDCTravelCommercePriceFacade- Parameters:
transportOfferingCodes- the transport offering codesptc- the ptc
-
getTaxesForProduct
protected List<TaxData> getTaxesForProduct(List<ProductModel> fareProducts, Map<String, Double> productCodeBaseFareMap) Method to retrieve taxes for the product based on transportFacility, country and passenger type.- Parameters:
fareProducts- the fare productsproductCodeBaseFareMap- the productCodeBaseFareMap- Returns:
- taxes for product
-
createPriceValue
protected List<TaxData> createPriceValue(Double priceData, List<de.hybris.platform.jalo.order.price.TaxInformation> taxInfos) Method to convert the Tax Information to Tax Data objects. Tax amount is calculated based on the absolute/relative value.- Parameters:
priceData- the price datataxInfos- the tax infos- Returns:
- list of TaxData objects.
-
calculateTaxForExtras
protected List<TaxData> calculateTaxForExtras(BundleTemplateModel ancillaryBundleTemplateModel, Map<String, Double> productCodeBaseFareMap, List<String> transportOfferings) Method to calculate tax for every product included in bundle.- Parameters:
ancillaryBundleTemplateModel- the ancillary bundle template modelproductCodeBaseFareMap- the product code base fare maptransportOfferings- the transportOfferings- Returns:
- the list of taxes
-
calculateTaxForProduct
protected List<TaxData> calculateTaxForProduct(ProductModel productModel, Map<String, String> transportOfferingCountryCodeMap, List<String> transportOfferings, Map<String, Double> productCodeBaseFareMap) Method to calculate tax for every product on the basis of whether given product is per transportOfferingCode or per route.- Parameters:
productModel- the product modeltransportOfferingCountryCodeMap- the transport offering country code maptransportOfferings- the transportOfferingsproductCodeBaseFareMap- the productCodeBaseFareMap
-
checkIfProductPerTO
Returns true if givenProductDatais per transport offering otherwise false.- Parameters:
productModel- the product model- Returns:
- the boolean
-
calculateTax
protected List<TaxData> calculateTax(String transportOfferingCode, Map<String, String> transportOfferingCountryCodeMap, ProductModel productModel, Map<String, Double> productCodeBaseFareMap) Method to calculate tax for givenProductModel,TransportOfferingModeland passengerType- Parameters:
transportOfferingCode- the transport offering codetransportOfferingCountryCodeMap- the transport offering country code mapproductModel- the product modelproductCodeBaseFareMap- the product code base fare map- Returns:
- the list
-
getTransportFacilityFacade
Gets transport facility facade.- Returns:
- the transport facility facade
-
setTransportFacilityFacade
-
getOfferGroupToOriginDestinationMapping
Gets offer group to origin destination mapping.- Returns:
- the offer group to origin destination mapping
-
setOfferGroupToOriginDestinationMapping
public void setOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Sets offer group to origin destination mapping.- Parameters:
offerGroupToOriginDestinationMapping- the offer group to origin destination mapping
-
getCommerceProductService
protected de.hybris.platform.commerceservices.product.CommerceProductService getCommerceProductService()Gets commerce product service.- Returns:
- the commerce product service
-
setCommerceProductService
public void setCommerceProductService(de.hybris.platform.commerceservices.product.CommerceProductService commerceProductService) Sets commerce product service.- Parameters:
commerceProductService- the commerce product service
-
getSessionService
protected de.hybris.platform.servicelayer.session.SessionService getSessionService()Gets session service.- Returns:
- the session service
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) Sets session service.- Parameters:
sessionService- the session service
-
getNdcPassengerTypeService
Gets ndc passenger type service.- Returns:
- the ndc passenger type service
-
setNdcPassengerTypeService
Sets ndc passenger type service.- Parameters:
ndcPassengerTypeService- the ndc passenger type service
-