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 Details

    • DefaultSapOaaCommerceStockService

      public DefaultSapOaaCommerceStockService()
  • Method Details

    • getStockLevelStatusForProductAndBaseStore

      public StockLevelStatus getStockLevelStatusForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)
      Specified by:
      getStockLevelStatusForProductAndBaseStore in interface de.hybris.platform.commerceservices.stock.CommerceStockService
      Overrides:
      getStockLevelStatusForProductAndBaseStore in class de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
    • getStockLevelForRSI

      public StockLevelModel getStockLevelForRSI(ProductModel product, BaseStoreModel baseStore)
      Description copied from interface: SapOaaCommerceStockService
      Get the stock information for a product and base store
      Specified by:
      getStockLevelForRSI in interface SapOaaCommerceStockService
      Parameters:
      product - This product rough stock will be checked.
      baseStore - This base store rough stock will be checked.
      Returns:
      StockLevelModel
    • getStockLevelForProductAndBaseStore

      public Long getStockLevelForProductAndBaseStore(ProductModel product, BaseStoreModel baseStore)
      Specified by:
      getStockLevelForProductAndBaseStore in interface de.hybris.platform.commerceservices.stock.CommerceStockService
      Overrides:
      getStockLevelForProductAndBaseStore in class de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
    • getStockLevelStatusForProductAndPointOfService

      public StockLevelStatus getStockLevelStatusForProductAndPointOfService(ProductModel product, PointOfServiceModel pointOfService)
      Specified by:
      getStockLevelStatusForProductAndPointOfService in interface de.hybris.platform.commerceservices.stock.CommerceStockService
      Overrides:
      getStockLevelStatusForProductAndPointOfService in class de.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:
      getStockLevelForProductAndPointOfService in interface de.hybris.platform.commerceservices.stock.CommerceStockService
      Overrides:
      getStockLevelForProductAndPointOfService in class de.hybris.platform.warehousing.atp.services.impl.WarehousingCommerceStockService
      Parameters:
      product -
      pointOfService -
      Returns:
      available stock in POS/Store
    • retrieveStockLevelForProduct

      public Long retrieveStockLevelForProduct(ProductModel product, PointOfServiceModel pointOfService)
    • getAvailableStockLevel

      public Long getAvailableStockLevel(String cartGuid, String itemId, ProductModel productModel, PointOfServiceModel pointOfServiceModel)
      Description copied from interface: SapOaaCommerceStockService
      Get current stock information calling ATP Service (CAR)
      Specified by:
      getAvailableStockLevel in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Get the availability for a given cart item.
      Specified by:
      getAvailabilityForProduct in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Get the availability for a given cart items and corresponding product unit.
      Specified by:
      getAvailabilityForProducts in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Get the availability for a given product and source.
      Specified by:
      getAvailabilityForProductAndSource in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Get the availability for a given cart item and source.
      Specified by:
      getAvailabilityForProductAndSource in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Get the availability for a given cart item and sources.
      Specified by:
      getAvailabilityForProductAndSources in interface SapOaaCommerceStockService
      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:
      getPosAndStockLevelStatusForProduct in interface de.hybris.platform.commerceservices.stock.CommerceStockService
      Overrides:
      getPosAndStockLevelStatusForProduct in class de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
    • getAvailableStockLevelForPos

      public Long getAvailableStockLevelForPos(String cartGuid, ProductModel productModel, PointOfServiceModel pointOfService)
      Description copied from interface: SapOaaCommerceStockService
      Get current stock information calling ATP Service (CAR)
      Specified by:
      getAvailableStockLevelForPos in interface SapOaaCommerceStockService
      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: SapOaaCommerceStockService
      Returns stock level value for combination of given product,base store and stock level status
      Specified by:
      getStockLevel in interface SapOaaCommerceStockService
      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:
      StockData information
    • 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
    • determinePointOfService

      protected PointOfServiceModel determinePointOfService(String sourceId)
      Parameters:
      sourceId -
      Returns:
      pointOfServiceModel
    • getCommonUtils

      public CommonUtils getCommonUtils()
      Returns:
      the commonUtils
    • setCommonUtils

      public void setCommonUtils(CommonUtils commonUtils)
      Parameters:
      commonUtils - the commonUtils to set