Interface TravelCommerceStockService
- All Superinterfaces:
de.hybris.platform.commerceservices.stock.CommerceStockService
- All Known Subinterfaces:
ShoppingTravelCommerceStockService
- All Known Implementing Classes:
DefaultShoppingTravelCommerceStockService,DefaultTravelCommerceStockService
public interface TravelCommerceStockService
extends de.hybris.platform.commerceservices.stock.CommerceStockService
Service that collects functionality for stock levels related with transport offering (warehouse). The service offers:
- getStockLevel get stock level for a particular product on a particular transport offering
- reserve stock for a particular order
- release stock on a particular order
- releaseForAmendment stock for an existing order
-
Method Summary
Modifier and TypeMethodDescriptionvoidadjustStockReservationForAmmendment(AbstractOrderModel newOrder, AbstractOrderModel originalOrder) Method compares the newOrder with the originalOrder and reserves stock accordingly.getStockForDate(ProductModel product, Date date, Collection<WarehouseModel> warehouses) This method returns the product availability for a given dategetStockLevel(ProductModel product, Collection<TransportOfferingModel> transportOfferings) Gets stock level.getStockLevelQuantity(ProductModel product, Collection<WarehouseModel> warehouses) This method calculates availability for a given productvoidrelease(AbstractOrderModel currentOrder) Release products in the specified warehouse for a given Order.voidreleasePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) This method performs stock releasing for an accommodation for a given datevoidreserve(AbstractOrderModel currentOrder) Reserves products in the specified warehouse for a given Order.voidreservePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) This method performs reservation for an accommodation for a given dateMethods inherited from interface de.hybris.platform.commerceservices.stock.CommerceStockService
getPosAndStockLevelStatusForProduct, getStockLevelForProductAndBaseStore, getStockLevelForProductAndPointOfService, getStockLevelStatusForProductAndBaseStore, getStockLevelStatusForProductAndPointOfService, isStockSystemEnabled
-
Method Details
-
getStockLevel
Gets stock level.- Parameters:
product- the product for which the stock level is checkedtransportOfferings- the collection of transport offering model for the given product.- Returns:
- Long stock level
-
reserve
void reserve(AbstractOrderModel currentOrder) throws de.hybris.platform.stock.exception.InsufficientStockLevelException Reserves products in the specified warehouse for a given Order. This method is wrapped in a transaction and so will only commit once the transaction completes without errors.- Parameters:
currentOrder- the current order- Throws:
de.hybris.platform.stock.exception.InsufficientStockLevelException- the insufficient stock level exception
-
release
Release products in the specified warehouse for a given Order.- Parameters:
currentOrder- the current order- Throws:
IllegalArgumentExceptionde.hybris.platform.servicelayer.exceptions.SystemException
-
adjustStockReservationForAmmendment
void adjustStockReservationForAmmendment(AbstractOrderModel newOrder, AbstractOrderModel originalOrder) throws de.hybris.platform.stock.exception.InsufficientStockLevelException Method compares the newOrder with the originalOrder and reserves stock accordingly.- Parameters:
newOrder- the new orderoriginalOrder- the original order- Throws:
de.hybris.platform.stock.exception.InsufficientStockLevelException- the insufficient stock level exception
-
getStockForDate
This method returns the product availability for a given date- Parameters:
product- the productdate- the datewarehouses- the warehouses- Returns:
- the availability
-
getStockLevelQuantity
This method calculates availability for a given product- Parameters:
product- the productwarehouses- the warehouses- Returns:
- a long value representing the stock level
-
reservePerDateProduct
void reservePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) throws de.hybris.platform.stock.exception.InsufficientStockLevelException This method performs reservation for an accommodation for a given date- Parameters:
product- the productdate- the datequantity- the quantitywarehouses- the warehouses- Throws:
de.hybris.platform.stock.exception.InsufficientStockLevelException- the insufficient stock level exception
-
releasePerDateProduct
void releasePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) This method performs stock releasing for an accommodation for a given date- Parameters:
product- the productdate- the datequantity- the quantitywarehouses- the warehouses
-