Class 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 Detail

      • DefaultSapOaaCommerceStockService

        public DefaultSapOaaCommerceStockService()
    • Method Detail

      • 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.commerceservices.stock.impl.DefaultCommerceStockService
      • getStockLevelForProductAndBaseStore

        public java.lang.Long getStockLevelForProductAndBaseStore​(ProductModel product,
                                                                  BaseStoreModel baseStore)
        Specified by:
        getStockLevelForProductAndBaseStore in interface de.hybris.platform.commerceservices.stock.CommerceStockService
        Overrides:
        getStockLevelForProductAndBaseStore in class de.hybris.platform.commerceservices.stock.impl.DefaultCommerceStockService
      • 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.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:
        getStockLevelForProductAndPointOfService in interface de.hybris.platform.commerceservices.stock.CommerceStockService
        Overrides:
        getStockLevelForProductAndPointOfService in class de.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: 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 java.util.List<ATPAvailability> getAvailabilityForProduct​(java.lang.String cartGuid,
                                                                         java.lang.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 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: 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 java.util.List<ATPAvailability> getAvailabilityForProductAndSource​(java.lang.String cartGuid,
                                                                                  java.lang.String itemId,
                                                                                  ProductModel product,
                                                                                  java.lang.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 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: 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 java.util.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 java.lang.Long getAvailableStockLevelForPos​(java.lang.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
      • 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