Class AbstractNDCAddAncillariesToOrderStrategy
java.lang.Object
de.hybris.platform.ndc182facades.facades.order.strategies.impl.AbstractNDCAddAncillariesToOrderStrategy
- All Implemented Interfaces:
NDCAddAncillaryToOrderStrategy
- Direct Known Subclasses:
NDCAddAncillaryToOrderPerBookingStrategy,NDCAddAncillaryToOrderPerLegPerPaxStrategy,NDCAddAncillaryToOrderPerLegStrategy,NDCAddAncillaryToOrderPerPaxStrategy
public abstract class AbstractNDCAddAncillariesToOrderStrategy
extends Object
implements NDCAddAncillaryToOrderStrategy
The Abstract ndc add ancillaries to order strategy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckTravellers(List<TravellerModel> travellers, ProductModel ancillaryProduct) Checks if the list ofTravellerModelis not empty.protected OrderEntryModelcreateOrderEntry(OrderModel order, ProductModel product, TravellerModel traveller, List<TransportOfferingModel> transportOfferings, String routeCode, int originDestinationRefNumber, Long quantity) Checks if an order entry for the sameProductModel,TravellerModeland list ofTransportOfferingModelexists.protected BookingServiceGets booking service.protected StringgetCategoryMapping(ProductModel ancillaryProduct) Returns the mapping extracted from the category that the providedProductModelbelongs to.protected de.hybris.platform.servicelayer.model.ModelServiceGets model service.protected NDCOrderFacadeGets ndc order facade.Gets offer group to origin destination mapping.protected TravelCommercePriceServiceGets travel commerce price service.protected TravelRouteServiceGets travel route service.protected de.hybris.platform.product.UnitServiceGets unit service.protected voidpopulateTravelOrderEntryInfoModel(TravelOrderEntryInfoModel travelOrderEntryInfo, int originDestinationRefNumber, List<TransportOfferingModel> transportOfferings, String routeCode, List<TravellerModel> travellers) Populates theTravelOrderEntryInfoModelvoidsetBookingService(BookingService bookingService) Sets booking service.voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.voidsetNdcOrderFacade(NDCOrderFacade ndcOrderFacade) Sets ndc order facade.voidsetOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Sets offer group to origin destination mapping.voidsetTravelCommercePriceService(TravelCommercePriceService travelCommercePriceService) Sets travel commerce price service.voidsetTravelRouteService(TravelRouteService travelRouteService) Sets travel route service.voidsetUnitService(de.hybris.platform.product.UnitService unitService) Sets unit service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.ndc182facades.facades.order.strategies.NDCAddAncillaryToOrderStrategy
addAncillary
-
Constructor Details
-
AbstractNDCAddAncillariesToOrderStrategy
public AbstractNDCAddAncillariesToOrderStrategy()
-
-
Method Details
-
createOrderEntry
protected OrderEntryModel createOrderEntry(OrderModel order, ProductModel product, TravellerModel traveller, List<TransportOfferingModel> transportOfferings, String routeCode, int originDestinationRefNumber, Long quantity) Checks if an order entry for the sameProductModel,TravellerModeland list ofTransportOfferingModelexists. In case it exist it updates the quantity, otherwise it creates a newAbstractOrderEntryModel- Parameters:
order- the orderproduct- the producttraveller- the travellertransportOfferings- the transport offeringsrouteCode- the route codeoriginDestinationRefNumber- the origin destination ref numberquantity- the quantity- Returns:
- the order entry model
-
populateTravelOrderEntryInfoModel
protected void populateTravelOrderEntryInfoModel(TravelOrderEntryInfoModel travelOrderEntryInfo, int originDestinationRefNumber, List<TransportOfferingModel> transportOfferings, String routeCode, List<TravellerModel> travellers) Populates theTravelOrderEntryInfoModel- Parameters:
travelOrderEntryInfo- the travel order entry infooriginDestinationRefNumber- the origin destination ref numbertransportOfferings- the transport offeringsrouteCode- the route codetravellers- the travellers
-
checkTravellers
protected void checkTravellers(List<TravellerModel> travellers, ProductModel ancillaryProduct) throws NDCException Checks if the list ofTravellerModelis not empty. PER_LEG_PER_PAX ancillaries needs to be associated to travellers- Parameters:
travellers- the travellersancillaryProduct- the ancillary product- Throws:
NDCException- the ndc exception
-
getCategoryMapping
Returns the mapping extracted from the category that the providedProductModelbelongs to.- Parameters:
ancillaryProduct- the ancillary product- Returns:
- category mapping
-
getNdcOrderFacade
Gets ndc order facade.- Returns:
- the ndc order facade
-
setNdcOrderFacade
Sets ndc order facade.- Parameters:
ndcOrderFacade- the ndc order facade
-
getBookingService
Gets booking service.- Returns:
- the booking service
-
setBookingService
Sets booking service.- Parameters:
bookingService- the booking service
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()Gets model service.- Returns:
- the model service
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.- Parameters:
modelService- the model service
-
getUnitService
protected de.hybris.platform.product.UnitService getUnitService()Gets unit service.- Returns:
- the unit service
-
setUnitService
public void setUnitService(de.hybris.platform.product.UnitService unitService) Sets unit service.- Parameters:
unitService- the unit service
-
getTravelRouteService
Gets travel route service.- Returns:
- the travel route service
-
setTravelRouteService
Sets travel route service.- Parameters:
travelRouteService- the travel route service
-
getTravelCommercePriceService
Gets travel commerce price service.- Returns:
- the travel commerce price service
-
setTravelCommercePriceService
Sets travel commerce price service.- Parameters:
travelCommercePriceService- the travel commerce price service
-
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
-