Class DefaultStockPOSValidator

java.lang.Object
de.hybris.platform.commercewebservices.core.validator.DefaultStockSystemValidator
de.hybris.platform.commercewebservices.core.validator.DefaultStockPOSValidator
All Implemented Interfaces:
StockPOSValidator, StockSystemValidator

public class DefaultStockPOSValidator extends DefaultStockSystemValidator implements StockPOSValidator
Implementation of stock validator that validates stock availability for the product in the point of service.
  • Constructor Details

    • DefaultStockPOSValidator

      public DefaultStockPOSValidator(CommerceStockFacade commerceStockFacade)
      Creates an instance of the validator
      Parameters:
      commerceStockFacade - Commerce stock facade to be used in the validation
  • Method Details

    • validate

      public void validate(String baseSiteId, String productCode, String storeName, Long entryNumber)
      Validates stock availability for the product in the given point of service.

      Throws StockSystemException in case stock system is unavailable for the base site.

      Throws LowStockException in case entry stock is insufficient, includes information about entry number as an error subject. Throws ProductLowStockException in case product stock is insufficient.

      Specified by:
      validate in interface StockPOSValidator
      Parameters:
      baseSiteId - Id of base site
      productCode - Code of the product
      storeName - Name of the point of service
      entryNumber - Number of entry in the cart