Class RoomRateManageStockStrategy
java.lang.Object
de.hybris.platform.travelservices.strategies.stock.accommodation.impl.RoomRateManageStockStrategy
- All Implemented Interfaces:
TravelManageStockStrategy
Class to manage stock for
RoomRateProductModel and the AccommodationModel associated-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TravelCommerceStockServiceGets commerce stock service.protected de.hybris.platform.stock.StockServiceGets stock service.voidrelease(AbstractOrderEntryModel abstractOrderEntry) For each entry this method release stock both for the room rate product associated with the entry and the relative accommodationprotected voidreleaseStockForAccommodation(AbstractOrderEntryGroupModel entryGroup, List<Date> dates) Release by date for accommodationprotected voidreleaseStockForRoomRate(ProductModel roomRateProduct, Long quantity, AbstractOrderEntryGroupModel entryGroup) Standard release for room rate product - no datevoidreserve(AbstractOrderEntryModel abstractOrderEntry) For each entry this method reserve stock both for the room rate product associated with the entry and the relative accommodationprotected voidreserveStockForAccommodation(AbstractOrderEntryGroupModel entryGroup, List<Date> dates) Reservation by date for accommodationprotected voidreserveStockForRoomRate(ProductModel roomRateProduct, Long quantity, AbstractOrderEntryGroupModel entryGroup) Standard reservation for room rate products - no datevoidsetCommerceStockService(TravelCommerceStockService commerceStockService) Sets commerce stock service.voidsetStockService(de.hybris.platform.stock.StockService stockService) Sets stock service.
-
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:
reservein interfaceTravelManageStockStrategy- Parameters:
abstractOrderEntry- the abstract order entry- Throws:
de.hybris.platform.stock.exception.InsufficientStockLevelException- the insufficient stock level exception
-
release
For each entry this method release stock both for the room rate product associated with the entry and the relative accommodation- Specified by:
releasein interfaceTravelManageStockStrategy- 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 productquantity- the quantityentryGroup- 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 groupdates- 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 productquantity- the quantityentryGroup- the entry group
-
releaseStockForAccommodation
protected void releaseStockForAccommodation(AbstractOrderEntryGroupModel entryGroup, List<Date> dates) Release by date for accommodation- Parameters:
entryGroup- the entry groupdates- 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
Gets commerce stock service.- Returns:
- commerceStockService commerce stock service
-
setCommerceStockService
Sets commerce stock service.- Parameters:
commerceStockService- the commerceStockService to set
-