Class DefaultEvaluateChangeSolutionResponseFareReferenceInformationHandler
java.lang.Object
de.hybris.platform.prosfacades.repricer.handler.impl.DefaultEvaluateChangeSolutionResponseFareReferenceInformationHandler
- All Implemented Interfaces:
EvaluateChangeSolutionResponseHandler
public class DefaultEvaluateChangeSolutionResponseFareReferenceInformationHandler
extends Object
implements EvaluateChangeSolutionResponseHandler
Populates fares information of
ChangeSolutionReferenceData from RepricerResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BundleTemplateModelfindBundleTemplate(String shoppingFareReference, String apiUser, String bundleTypeCode) Find a fare product bundle template by bundleType, shopping reference code and api user.protected List<CategoryData>getCategories(Collection<CategoryModel> superCategories) Get the category data listprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected PROSTravelBundleTemplateServiceGets pros travel bundle template service.voidhandle(AbstractOrderModel orderModel, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest, RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData) Handler to populate the reference data section and the repriced solutions.protected voidpopulateBundleProductData(List<BasicProductData> basicProductDataList, BundleTemplateModel bundleTemplateModel) Populates the bundle product data from the bundle templateprotected voidpopulateFareBundleDataList(BundleTemplateModel bundleTemplateModel, Integer fareBundleDataId, List<FareBundleData> fareBundleDataList) Populates the fare bundle data list.protected voidpopulateFareDataList(AltSolutionFare changedSolutionFare, List<FareData> fareDataList, List<FareBundleData> fareBundleDataList, List<BasicProductData> fareBundleProductDataList, String apiUser) Populates the fare data list.protected voidpopulateFaresData(RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData, String apiUser) Populates the fare reference data, together with the fareBundleProducts which are the included product in a bundle template.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.
-
Constructor Details
-
DefaultEvaluateChangeSolutionResponseFareReferenceInformationHandler
public DefaultEvaluateChangeSolutionResponseFareReferenceInformationHandler()
-
-
Method Details
-
handle
public void handle(AbstractOrderModel orderModel, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest, RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData) throws ChangeFlightException Description copied from interface:EvaluateChangeSolutionResponseHandlerHandler to populate the reference data section and the repriced solutions.- Specified by:
handlein interfaceEvaluateChangeSolutionResponseHandler- Parameters:
orderModel- the abstract order modelrepricingRequestData- the repricingRequestDatarepricerRequest- the repricer requestrepricerResponse- the repricer response- Throws:
ChangeFlightException
-
populateFaresData
protected void populateFaresData(RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData, String apiUser) throws ChangeFlightException Populates the fare reference data, together with the fareBundleProducts which are the included product in a bundle template.- Parameters:
repricerResponse- the repricer responseevaluateChangeSolutionResponseData- the evaluate change solution response dataapiUser- the api user- Throws:
ChangeFlightException- the change flight exception
-
populateFareDataList
protected void populateFareDataList(AltSolutionFare changedSolutionFare, List<FareData> fareDataList, List<FareBundleData> fareBundleDataList, List<BasicProductData> fareBundleProductDataList, String apiUser) throws ChangeFlightException Populates the fare data list.- Parameters:
changedSolutionFare- the changed solution farefareDataList- the fare data listfareBundleDataList- the fare bundle data listfareBundleProductDataList- the fare bundle product data listapiUser- the api user- Throws:
ChangeFlightException- the change flight exception
-
findBundleTemplate
protected BundleTemplateModel findBundleTemplate(String shoppingFareReference, String apiUser, String bundleTypeCode) Find a fare product bundle template by bundleType, shopping reference code and api user.- Parameters:
shoppingFareReference- the shopping fare referenceapiUser- the api userbundleTypeCode- the bundle type code- Returns:
- the bundle template model
-
populateFareBundleDataList
protected void populateFareBundleDataList(BundleTemplateModel bundleTemplateModel, Integer fareBundleDataId, List<FareBundleData> fareBundleDataList) Populates the fare bundle data list.- Parameters:
bundleTemplateModel- the bundle template modelfareBundleDataId- the fare bundle data idfareBundleDataList- the fare bundle data list
-
populateBundleProductData
protected void populateBundleProductData(List<BasicProductData> basicProductDataList, BundleTemplateModel bundleTemplateModel) Populates the bundle product data from the bundle template- Parameters:
basicProductDataList- list of product databundleTemplateModel- bundle template
-
getCategories
Get the category data list- Parameters:
superCategories- collection of Categories of the product- Returns:
- list of category data
-
getProsTravelBundleTemplateService
Gets pros travel bundle template service.- Returns:
- the pros travel bundle template service
-
setProsTravelBundleTemplateService
public void setProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.- Parameters:
prosTravelBundleTemplateService- the pros travel bundle template service
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()Gets configuration service.- Returns:
- the configuration service
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.- Parameters:
configurationService- the configuration service
-