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 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 same ProductModel, TravellerModel and list of TransportOfferingModel exists. In case it exist it updates the quantity, otherwise it creates a new AbstractOrderEntryModel
      Parameters:
      order - the order
      product - the product
      traveller - the traveller
      transportOfferings - the transport offerings
      routeCode - the route code
      originDestinationRefNumber - the origin destination ref number
      quantity - the quantity
      Returns:
      the order entry model
    • populateTravelOrderEntryInfoModel

      protected void populateTravelOrderEntryInfoModel(TravelOrderEntryInfoModel travelOrderEntryInfo, int originDestinationRefNumber, List<TransportOfferingModel> transportOfferings, String routeCode, List<TravellerModel> travellers)
      Parameters:
      travelOrderEntryInfo - the travel order entry info
      originDestinationRefNumber - the origin destination ref number
      transportOfferings - the transport offerings
      routeCode - the route code
      travellers - the travellers
    • checkTravellers

      protected void checkTravellers(List<TravellerModel> travellers, ProductModel ancillaryProduct) throws NDCException
      Checks if the list of TravellerModel is not empty. PER_LEG_PER_PAX ancillaries needs to be associated to travellers
      Parameters:
      travellers - the travellers
      ancillaryProduct - the ancillary product
      Throws:
      NDCException - the ndc exception
    • getCategoryMapping

      protected String getCategoryMapping(ProductModel ancillaryProduct)
      Returns the mapping extracted from the category that the provided ProductModel belongs to.
      Parameters:
      ancillaryProduct - the ancillary product
      Returns:
      category mapping
    • getNdcOrderFacade

      protected NDCOrderFacade getNdcOrderFacade()
      Gets ndc order facade.
      Returns:
      the ndc order facade
    • setNdcOrderFacade

      public void setNdcOrderFacade(NDCOrderFacade ndcOrderFacade)
      Sets ndc order facade.
      Parameters:
      ndcOrderFacade - the ndc order facade
    • getBookingService

      protected BookingService getBookingService()
      Gets booking service.
      Returns:
      the booking service
    • setBookingService

      public void setBookingService(BookingService bookingService)
      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

      protected TravelRouteService getTravelRouteService()
      Gets travel route service.
      Returns:
      the travel route service
    • setTravelRouteService

      public void setTravelRouteService(TravelRouteService travelRouteService)
      Sets travel route service.
      Parameters:
      travelRouteService - the travel route service
    • getTravelCommercePriceService

      protected TravelCommercePriceService getTravelCommercePriceService()
      Gets travel commerce price service.
      Returns:
      the travel commerce price service
    • setTravelCommercePriceService

      public void setTravelCommercePriceService(TravelCommercePriceService travelCommercePriceService)
      Sets travel commerce price service.
      Parameters:
      travelCommercePriceService - the travel commerce price service
    • getOfferGroupToOriginDestinationMapping

      protected Map<String,String> 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