Class DefaultShoppingAutoAccommodationAllocationStrategy

java.lang.Object
de.hybris.platform.travelservices.strategies.impl.DefaultAutoAccommodationAllocationStrategy
de.hybris.platform.shoppingservices.strategies.impl.DefaultShoppingAutoAccommodationAllocationStrategy
All Implemented Interfaces:
AutoAccommodationAllocationStrategy

public class DefaultShoppingAutoAccommodationAllocationStrategy extends DefaultAutoAccommodationAllocationStrategy
Shopping extension of DefaultAutoAccommodationAllocationStrategy class.
  • Constructor Details

    • DefaultShoppingAutoAccommodationAllocationStrategy

      public DefaultShoppingAutoAccommodationAllocationStrategy()
  • Method Details

    • autoAllocateSeat

      public void autoAllocateSeat(AbstractOrderModel abstractOrderModel, Integer legNumber, List<String> travellerReferences)
      This strategy follows one rule that is to allocate the first available seat. Accommodation types are represented in the following hierarchy Decks -> Cabin -> Rows -> Columns -> Seats. So, finding the first seat available, resembles the traditional DFS(Depth first search) algorithm.
      Specified by:
      autoAllocateSeat in interface AutoAccommodationAllocationStrategy
      Overrides:
      autoAllocateSeat in class DefaultAutoAccommodationAllocationStrategy
      Parameters:
      abstractOrderModel - the abstract order model
      legNumber - the leg number
      travellerReferences - the traveller references
    • getTransportOfferingTravelAccommodationMap

      protected void getTransportOfferingTravelAccommodationMap(AbstractOrderModel abstractOrderModel, List<TravellerModel> travellers, Map<TransportOfferingModel,Map<TravellerModel,ConfiguredAccommodationModel>> transportOfferingTravellerAccomodationMap, TransportOfferingModel transportOffering, Optional<TransportVehicleInfoModel> vehicleInfo, long numberOfSeatsToAllocate)
      Gets the accommodation map
      Parameters:
      abstractOrderModel - the abstract order model
      travellers - the travellers
      transportOfferingTravellerAccomodationMap - the transportOfferingTravellerAccomodationMap
      transportOffering - the transportOffering
      vehicleInfo - the vehicleInfo
      numberOfSeatsToAllocate - the number of seats to allocate
    • getShoppingAccommodationMapService

      protected ShoppingAccommodationMapService getShoppingAccommodationMapService()
      Gets the shoppingAccommodationMapService
      Returns:
      the shoppingAccommodationMapService
    • setShoppingAccommodationMapService

      public void setShoppingAccommodationMapService(ShoppingAccommodationMapService shoppingAccommodationMapService)
      Sets the shoppingAccommodationMapService
      Parameters:
      shoppingAccommodationMapService - the shoppingAccommodationMapService