Class DefaultSapOaaCommerceStockService
java.lang.Object
de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
com.sap.retail.oaa.commerce.services.stock.impl.DefaultSapOaaCommerceStockService
- All Implemented Interfaces:
SapOaaCommerceStockService,de.hybris.platform.commerceservices.stock.CommerceStockService
- Direct Known Subclasses:
DefaultSapCosOaaCommerceStockService
public class DefaultSapOaaCommerceStockService
extends de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
implements SapOaaCommerceStockService
Default implementation of OAA Stock Service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PointOfServiceModeldeterminePointOfService(String sourceId) protected ATPAggregationStrategyprotected ATPServicegetAvailabilityForProduct(String cartGuid, String itemId, ProductModel product) Get the availability for a given cart item.getAvailabilityForProductAndSource(ProductModel product, String source) Get the availability for a given product and source.getAvailabilityForProductAndSource(String cartGuid, String itemId, ProductModel product, String source) Get the availability for a given cart item and source.getAvailabilityForProductAndSources(String cartGuid, String itemId, ProductModel product, List<String> sourcesList) Get the availability for a given cart item and sources.getAvailabilityForProducts(String cartGuid, String itemId, String productUnit, List<ProductModel> productList) Get the availability for a given cart items and corresponding product unit.getAvailableStockLevel(String cartGuid, String itemId, ProductModel productModel, PointOfServiceModel pointOfServiceModel) Get current stock information calling ATP Service (CAR)getAvailableStockLevelForPos(String cartGuid, ProductModel productModel, PointOfServiceModel pointOfService) Get current stock information calling ATP Service (CAR)protected de.hybris.platform.storelocator.PointOfServiceDaogetPosAndStockLevelStatusForProduct(ProductModel product, BaseStoreModel baseStore) getStockLevel(StockLevelStatus stockLevelStatus, ProductModel product, BaseStoreModel baseStore) Returns stock level value for combination of given product,base store and stock level statusgetStockLevelForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore) getStockLevelForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService) Get actual stock information calling ATP Service (CAR) for product in storegetStockLevelForRSI(ProductModel product, BaseStoreModel baseStore) Get the stock information for a product and base storegetStockLevelStatusForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore) getStockLevelStatusForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService) retrieveStockLevelForProduct(ProductModel product, PointOfServiceModel pointOfService) voidsetAtpAggregationStrategy(ATPAggregationStrategy atpAggregationStrategy) voidsetAtpService(ATPService atpService) voidsetCommonUtils(CommonUtils commonUtils) voidsetPointOfServiceDao(de.hybris.platform.storelocator.PointOfServiceDao pointOfServiceDao) Methods inherited from class de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
getPickupWarehouseSelectionStrategy, setPickupWarehouseSelectionStrategyMethods inherited from class de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
getCommerceStockLevelCalculationStrategy, getStockLevelProductStrategy, getStockLevelStatusStrategy, getStockService, getStorePickupDao, getWarehouseSelectionStrategy, isStockSystemEnabled, 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
isStockSystemEnabled
-
Constructor Details
-
DefaultSapOaaCommerceStockService
public DefaultSapOaaCommerceStockService()
-
-
Method Details
-
getStockLevelStatusForProductAndBaseStore
public StockLevelStatus getStockLevelStatusForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore) - Specified by:
getStockLevelStatusForProductAndBaseStorein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelStatusForProductAndBaseStorein classde.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
-
getStockLevelForRSI
Description copied from interface:SapOaaCommerceStockServiceGet the stock information for a product and base store- Specified by:
getStockLevelForRSIin interfaceSapOaaCommerceStockService- Parameters:
product- This product rough stock will be checked.baseStore- This base store rough stock will be checked.- Returns:
- StockLevelModel
-
getStockLevelForProductAndBaseStore
- Specified by:
getStockLevelForProductAndBaseStorein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelForProductAndBaseStorein classde.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
-
getStockLevelStatusForProductAndPointOfService
public StockLevelStatus getStockLevelStatusForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService) - Specified by:
getStockLevelStatusForProductAndPointOfServicein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelStatusForProductAndPointOfServicein classde.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
-
getStockLevelForProductAndPointOfService
public Long getStockLevelForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService) Get actual stock information calling ATP Service (CAR) for product in store- Specified by:
getStockLevelForProductAndPointOfServicein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelForProductAndPointOfServicein classde.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService- Parameters:
product-pointOfService-- Returns:
- available stock in POS/Store
-
retrieveStockLevelForProduct
-
getAvailableStockLevel
public Long getAvailableStockLevel(String cartGuid, String itemId, ProductModel productModel, PointOfServiceModel pointOfServiceModel) Description copied from interface:SapOaaCommerceStockServiceGet current stock information calling ATP Service (CAR)- Specified by:
getAvailableStockLevelin interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.productModel- This product stock will be checked.pointOfServiceModel- This point of service stock will be checked.- Returns:
- total aggregated ATP amount
-
getAvailabilityForProduct
public List<ATPAvailability> getAvailabilityForProduct(String cartGuid, String itemId, ProductModel product) Description copied from interface:SapOaaCommerceStockServiceGet the availability for a given cart item.- Specified by:
getAvailabilityForProductin interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- This product availability will be checked.- Returns:
- list of availability
-
getAvailabilityForProducts
public List<ATPProductAvailability> getAvailabilityForProducts(String cartGuid, String itemId, String productUnit, List<ProductModel> productList) Description copied from interface:SapOaaCommerceStockServiceGet the availability for a given cart items and corresponding product unit.- Specified by:
getAvailabilityForProductsin interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.productUnit- This product unit will be checked.productList- This list of product whose availability will be checked.- Returns:
- list of ATP product availability
-
getAvailabilityForProductAndSource
public List<ATPAvailability> getAvailabilityForProductAndSource(ProductModel product, String source) Description copied from interface:SapOaaCommerceStockServiceGet the availability for a given product and source.- Specified by:
getAvailabilityForProductAndSourcein interfaceSapOaaCommerceStockService- Parameters:
product- This product availability will be checked.source- Product availability will be checked against given source.- Returns:
- list of availability
-
getAvailabilityForProductAndSource
public List<ATPAvailability> getAvailabilityForProductAndSource(String cartGuid, String itemId, ProductModel product, String source) Description copied from interface:SapOaaCommerceStockServiceGet the availability for a given cart item and source.- Specified by:
getAvailabilityForProductAndSourcein interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- This product availability will be checked.source- Product availability will be checked against given source.- Returns:
- list of availability
-
getAvailabilityForProductAndSources
public List<ATPProductAvailability> getAvailabilityForProductAndSources(String cartGuid, String itemId, ProductModel product, List<String> sourcesList) Description copied from interface:SapOaaCommerceStockServiceGet the availability for a given cart item and sources.- Specified by:
getAvailabilityForProductAndSourcesin interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- This product availability will be checked.sourcesList- This source list availability will be checked.- Returns:
- list of ATP product availability
-
getPosAndStockLevelStatusForProduct
public Map<PointOfServiceModel,StockLevelStatus> getPosAndStockLevelStatusForProduct(ProductModel product, BaseStoreModel baseStore) - Specified by:
getPosAndStockLevelStatusForProductin interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getPosAndStockLevelStatusForProductin classde.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
-
getAvailableStockLevelForPos
public Long getAvailableStockLevelForPos(String cartGuid, ProductModel productModel, PointOfServiceModel pointOfService) Description copied from interface:SapOaaCommerceStockServiceGet current stock information calling ATP Service (CAR)- Specified by:
getAvailableStockLevelForPosin interfaceSapOaaCommerceStockService- Parameters:
cartGuid- The id for the cart.productModel- This product availability will be checked.pointOfService- This point of service availability will be checked.- Returns:
- total aggregated ATP amount
-
getStockLevel
public Long getStockLevel(StockLevelStatus stockLevelStatus, ProductModel product, BaseStoreModel baseStore) Description copied from interface:SapOaaCommerceStockServiceReturns stock level value for combination of given product,base store and stock level status- Specified by:
getStockLevelin interfaceSapOaaCommerceStockService- Parameters:
stockLevelStatus- This is used for populating Stock Level Status.product- This product availability will be checked.baseStore- This is used for validating associated warehouse .- Returns:
StockDatainformation
-
setPointOfServiceDao
public void setPointOfServiceDao(de.hybris.platform.storelocator.PointOfServiceDao pointOfServiceDao) - Parameters:
pointOfServiceDao- the pointOfServiceDao to set
-
getPointOfServiceDao
protected de.hybris.platform.storelocator.PointOfServiceDao getPointOfServiceDao()- Returns:
- the pointOfServiceDao
-
setAtpService
- Parameters:
atpService- the atpService to set
-
getAtpService
- Returns:
- the atpService
-
setAtpAggregationStrategy
- Parameters:
atpAggregationStrategy- the atpStrategy to set
-
getAtpAggregationStrategy
- Returns:
- the atpAggregationStrategy
-
determinePointOfService
- Parameters:
sourceId-- Returns:
- pointOfServiceModel
-
getCommonUtils
- Returns:
- the commonUtils
-
setCommonUtils
- Parameters:
commonUtils- the commonUtils to set
-