Class DefaultSapOaaCommerceStockService
- java.lang.Object
-
- de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
-
- com.sap.retail.oaa.commerce.services.stock.impl.DefaultSapOaaCommerceStockService
-
- All Implemented Interfaces:
SapOaaCommerceStockService,de.hybris.platform.commerceservices.stock.CommerceStockService
public class DefaultSapOaaCommerceStockService extends de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService implements SapOaaCommerceStockService
Default implementation of OAA Stock Service
-
-
Constructor Summary
Constructors Constructor Description DefaultSapOaaCommerceStockService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ATPAggregationStrategygetAtpAggregationStrategy()protected ATPServicegetAtpService()java.util.List<ATPAvailability>getAvailabilityForProduct(java.lang.String cartGuid, java.lang.String itemId, ProductModel product)Get the availability for a given cart item.java.util.List<ATPAvailability>getAvailabilityForProductAndSource(ProductModel product, java.lang.String source)Get the availability for a given product and source.java.util.List<ATPAvailability>getAvailabilityForProductAndSource(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.lang.String source)Get the availability for a given cart item and source.java.util.List<ATPProductAvailability>getAvailabilityForProductAndSources(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.util.List<java.lang.String> sourcesList)Get the availability for a given cart item and sources.java.util.List<ATPProductAvailability>getAvailabilityForProducts(java.lang.String cartGuid, java.lang.String itemId, java.lang.String productUnit, java.util.List<ProductModel> productList)Get the availability for a given cart items and corresponding product unit.java.lang.LonggetAvailableStockLevel(java.lang.String cartGuid, java.lang.String itemId, ProductModel productModel, PointOfServiceModel pointOfServiceModel)Get current stock information calling ATP Service (CAR)java.lang.LonggetAvailableStockLevelForPos(java.lang.String cartGuid, ProductModel productModel, PointOfServiceModel pointOfService)Get current stock information calling ATP Service (CAR)protected de.hybris.platform.storelocator.PointOfServiceDaogetPointOfServiceDao()java.util.Map<PointOfServiceModel,StockLevelStatus>getPosAndStockLevelStatusForProduct(ProductModel product, BaseStoreModel baseStore)protected java.lang.LonggetStockLevel(StockLevelStatus stockLevelStatus, ProductModel product, BaseStoreModel baseStore)java.lang.LonggetStockLevelForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)java.lang.LonggetStockLevelForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService)Get actual stock information calling ATP Service (CAR) for product in storeStockLevelModelgetStockLevelForRSI(ProductModel product, BaseStoreModel baseStore)Get the stock information for a product and base storeStockLevelStatusgetStockLevelStatusForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)StockLevelStatusgetStockLevelStatusForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService)voidsetAtpAggregationStrategy(ATPAggregationStrategy atpAggregationStrategy)voidsetAtpService(ATPService atpService)voidsetPointOfServiceDao(de.hybris.platform.storelocator.PointOfServiceDao pointOfServiceDao)-
Methods inherited from class de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
getCommerceStockLevelCalculationStrategy, getStockLevelProductStrategy, getStockLevelStatusStrategy, getStockService, getStorePickupDao, getWarehouseSelectionStrategy, isStockSystemEnabled, setCommerceStockLevelCalculationStrategy, setStockLevelProductStrategy, setStockLevelStatusStrategy, setStockService, setStorePickupDao, setWarehouseSelectionStrategy
-
-
-
-
Method Detail
-
getStockLevelStatusForProductAndBaseStore
public StockLevelStatus getStockLevelStatusForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)
- Specified by:
getStockLevelStatusForProductAndBaseStorein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelStatusForProductAndBaseStorein classde.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
-
getStockLevelForRSI
public StockLevelModel getStockLevelForRSI(ProductModel product, BaseStoreModel baseStore)
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
public java.lang.Long getStockLevelForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)
- Specified by:
getStockLevelForProductAndBaseStorein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelForProductAndBaseStorein classde.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
-
getStockLevelStatusForProductAndPointOfService
public StockLevelStatus getStockLevelStatusForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService)
- Specified by:
getStockLevelStatusForProductAndPointOfServicein interfacede.hybris.platform.commerceservices.stock.CommerceStockService- Overrides:
getStockLevelStatusForProductAndPointOfServicein classde.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
-
getStockLevelForProductAndPointOfService
public java.lang.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.commerceservices.stock.impl.DefaultCommerceStockService- Parameters:
product-pointOfService-- Returns:
- available stock in POS/Store
-
getAvailableStockLevel
public java.lang.Long getAvailableStockLevel(java.lang.String cartGuid, java.lang.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 java.util.List<ATPAvailability> getAvailabilityForProduct(java.lang.String cartGuid, java.lang.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 java.util.List<ATPProductAvailability> getAvailabilityForProducts(java.lang.String cartGuid, java.lang.String itemId, java.lang.String productUnit, java.util.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 java.util.List<ATPAvailability> getAvailabilityForProductAndSource(ProductModel product, java.lang.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 java.util.List<ATPAvailability> getAvailabilityForProductAndSource(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.lang.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 java.util.List<ATPProductAvailability> getAvailabilityForProductAndSources(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.util.List<java.lang.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 java.util.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 java.lang.Long getAvailableStockLevelForPos(java.lang.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
protected java.lang.Long getStockLevel(StockLevelStatus stockLevelStatus, ProductModel product, BaseStoreModel baseStore)
-
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
public void setAtpService(ATPService atpService)
- Parameters:
atpService- the atpService to set
-
getAtpService
protected ATPService getAtpService()
- Returns:
- the atpService
-
setAtpAggregationStrategy
public void setAtpAggregationStrategy(ATPAggregationStrategy atpAggregationStrategy)
- Parameters:
atpAggregationStrategy- the atpStrategy to set
-
getAtpAggregationStrategy
protected ATPAggregationStrategy getAtpAggregationStrategy()
- Returns:
- the atpAggregationStrategy
-
-