Class DefaultStockPOSValidator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void validate​(java.lang.String baseSiteId, java.lang.String productCode, java.lang.String storeName, java.lang.Long entryNumber)
      Validates stock availability for the product in the given point of service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultStockPOSValidator

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

      • validate

        public void validate​(java.lang.String baseSiteId,
                             java.lang.String productCode,
                             java.lang.String storeName,
                             java.lang.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