java.lang.Object
de.hybris.platform.travelservices.strategies.stock.accommodation.impl.RoomRateManageStockStrategy
All Implemented Interfaces:
TravelManageStockStrategy

public class RoomRateManageStockStrategy extends Object implements TravelManageStockStrategy
Class to manage stock for RoomRateProductModel and the AccommodationModel associated
  • Constructor Details

    • RoomRateManageStockStrategy

      public RoomRateManageStockStrategy()
  • Method Details

    • reserve

      public void reserve(AbstractOrderEntryModel abstractOrderEntry) throws de.hybris.platform.stock.exception.InsufficientStockLevelException
      For each entry this method reserve stock both for the room rate product associated with the entry and the relative accommodation
      Specified by:
      reserve in interface TravelManageStockStrategy
      Parameters:
      abstractOrderEntry - the abstract order entry
      Throws:
      de.hybris.platform.stock.exception.InsufficientStockLevelException - the insufficient stock level exception
    • release

      public void release(AbstractOrderEntryModel abstractOrderEntry)
      For each entry this method release stock both for the room rate product associated with the entry and the relative accommodation
      Specified by:
      release in interface TravelManageStockStrategy
      Parameters:
      abstractOrderEntry - the abstract order entry
    • reserveStockForRoomRate

      protected void reserveStockForRoomRate(ProductModel roomRateProduct, Long quantity, AbstractOrderEntryGroupModel entryGroup) throws de.hybris.platform.stock.exception.InsufficientStockLevelException
      Standard reservation for room rate products - no date
      Parameters:
      roomRateProduct - the room rate product
      quantity - the quantity
      entryGroup - the entry group
      Throws:
      de.hybris.platform.stock.exception.InsufficientStockLevelException - the insufficient stock level exception
    • reserveStockForAccommodation

      protected void reserveStockForAccommodation(AbstractOrderEntryGroupModel entryGroup, List<Date> dates) throws de.hybris.platform.stock.exception.InsufficientStockLevelException
      Reservation by date for accommodation
      Parameters:
      entryGroup - the entry group
      dates - the dates
      Throws:
      de.hybris.platform.stock.exception.InsufficientStockLevelException - the insufficient stock level exception
    • releaseStockForRoomRate

      protected void releaseStockForRoomRate(ProductModel roomRateProduct, Long quantity, AbstractOrderEntryGroupModel entryGroup)
      Standard release for room rate product - no date
      Parameters:
      roomRateProduct - the room rate product
      quantity - the quantity
      entryGroup - the entry group
    • releaseStockForAccommodation

      protected void releaseStockForAccommodation(AbstractOrderEntryGroupModel entryGroup, List<Date> dates)
      Release by date for accommodation
      Parameters:
      entryGroup - the entry group
      dates - the dates
    • getStockService

      protected de.hybris.platform.stock.StockService getStockService()
      Gets stock service.
      Returns:
      the stockService
    • setStockService

      public void setStockService(de.hybris.platform.stock.StockService stockService)
      Sets stock service.
      Parameters:
      stockService - the stockService to set
    • getCommerceStockService

      protected TravelCommerceStockService getCommerceStockService()
      Gets commerce stock service.
      Returns:
      commerceStockService commerce stock service
    • setCommerceStockService

      public void setCommerceStockService(TravelCommerceStockService commerceStockService)
      Sets commerce stock service.
      Parameters:
      commerceStockService - the commerceStockService to set