Class DefaultShoppingTravelCommerceStockService
java.lang.Object
de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
de.hybris.platform.travelservices.stock.impl.DefaultTravelCommerceStockService
de.hybris.platform.shoppingservices.stock.services.impl.DefaultShoppingTravelCommerceStockService
- All Implemented Interfaces:
de.hybris.platform.commerceservices.stock.CommerceStockService,ShoppingTravelCommerceStockService,TravelCommerceStockService
public class DefaultShoppingTravelCommerceStockService
extends DefaultTravelCommerceStockService
implements ShoppingTravelCommerceStockService
The type Default shopping travel commerce stock service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAccommodationServiceStockForDate(ProductModel product, Date date, Collection<WarehouseModel> warehouses) Returns the value of stock of the given service product for the given date in the given warehouse.protected Map<String,ShoppingStockCalculationStrategy> Gets the shopping stock calculation strategy mapgetStockLevelQuantity(ProductModel product, Collection<WarehouseModel> warehouses) This method calculates availability for a given productvoidreleasePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) This method performs stock releasing for an accommodation for a given datevoidreservePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) This method performs reservation for an accommodation for a given datevoidsetShoppingStockCalculationStrategyMap(Map<String, ShoppingStockCalculationStrategy> shoppingStockCalculationStrategyMap) Sets shopping stock calculation strategy map.Methods inherited from class de.hybris.platform.travelservices.stock.impl.DefaultTravelCommerceStockService
adjustStockReservation, adjustStockReservationForAmmendment, enableStockReservation, findMatchingProduct, getConfigurationService, getManageStockByEntryTypeStrategyMap, getModelService, getProductsPerTransportOffering, getProductsPerWarehouse, getStockForDate, getStockLevel, getStockLevelModelForDate, getStockReservationCreationStrategyMap, getStockReservationReleaseByEntryTypeStrategyMap, getStrategyForEntryType, getTravelRestrictionService, getTravelStockService, getWarehouseService, isSameDate, isStockSystemEnabled, release, reserve, setConfigurationService, setManageStockByEntryTypeStrategyMap, setModelService, setStockReservationCreationStrategyMap, setStockReservationReleaseByEntryTypeStrategyMap, setTravelRestrictionService, setTravelStockService, setWarehouseServiceMethods inherited from class de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
getCommerceStockLevelCalculationStrategy, getPosAndStockLevelStatusForProduct, getStockLevelForProductAndBaseStore, getStockLevelForProductAndPointOfService, getStockLevelProductStrategy, getStockLevelStatusForProductAndBaseStore, getStockLevelStatusForProductAndPointOfService, getStockLevelStatusStrategy, getStockService, getStorePickupDao, getWarehouseSelectionStrategy, setCommerceStockLevelCalculationStrategy, setStockLevelProductStrategy, setStockLevelStatusStrategy, setStockService, setStorePickupDao, setWarehouseSelectionStrategyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commerceservices.stock.CommerceStockService
getPosAndStockLevelStatusForProduct, getStockLevelForProductAndBaseStore, getStockLevelForProductAndPointOfService, getStockLevelStatusForProductAndBaseStore, getStockLevelStatusForProductAndPointOfService, isStockSystemEnabledMethods inherited from interface de.hybris.platform.travelservices.stock.TravelCommerceStockService
adjustStockReservationForAmmendment, getStockForDate, getStockLevel, release, reserve
-
Constructor Details
-
DefaultShoppingTravelCommerceStockService
public DefaultShoppingTravelCommerceStockService()
-
-
Method Details
-
getStockLevelQuantity
Description copied from interface:TravelCommerceStockServiceThis method calculates availability for a given product- Specified by:
getStockLevelQuantityin interfaceTravelCommerceStockService- Overrides:
getStockLevelQuantityin classDefaultTravelCommerceStockService- Parameters:
product- the productwarehouses- the warehouses- Returns:
- a long value representing the stock level
-
getAccommodationServiceStockForDate
public Long getAccommodationServiceStockForDate(ProductModel product, Date date, Collection<WarehouseModel> warehouses) Returns the value of stock of the given service product for the given date in the given warehouse. It returns null if theInStockStatusis force in stock, while force out of stock will be treated as zero available quantity.- Specified by:
getAccommodationServiceStockForDatein interfaceShoppingTravelCommerceStockService- Parameters:
product- the productdate- the datewarehouses- a collection of warehouses where to find stock levels- Returns:
- the value of stock
-
reservePerDateProduct
public void reservePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) throws de.hybris.platform.stock.exception.InsufficientStockLevelException Description copied from interface:TravelCommerceStockServiceThis method performs reservation for an accommodation for a given date- Specified by:
reservePerDateProductin interfaceTravelCommerceStockService- Overrides:
reservePerDateProductin classDefaultTravelCommerceStockService- Parameters:
product- the productdate- the datequantity- the quantitywarehouses- the warehouses- Throws:
de.hybris.platform.stock.exception.InsufficientStockLevelException- the insufficient stock level exception
-
releasePerDateProduct
public void releasePerDateProduct(ProductModel product, Date date, int quantity, Collection<WarehouseModel> warehouses) Description copied from interface:TravelCommerceStockServiceThis method performs stock releasing for an accommodation for a given date- Specified by:
releasePerDateProductin interfaceTravelCommerceStockService- Overrides:
releasePerDateProductin classDefaultTravelCommerceStockService- Parameters:
product- the productdate- the datequantity- the quantitywarehouses- the warehouses
-
getShoppingStockCalculationStrategyMap
Gets the shopping stock calculation strategy map- Returns:
- the shopping stock calculation strategy map
-
setShoppingStockCalculationStrategyMap
public void setShoppingStockCalculationStrategyMap(Map<String, ShoppingStockCalculationStrategy> shoppingStockCalculationStrategyMap) Sets shopping stock calculation strategy map.- Parameters:
shoppingStockCalculationStrategyMap- the shopping stock calculation strategy map
-