Class DefaultStockPOSValidator
java.lang.Object
de.hybris.platform.ycommercewebservices.validator.DefaultStockSystemValidator
de.hybris.platform.ycommercewebservices.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 Summary
ConstructorsConstructorDescriptionDefaultStockPOSValidator(CommerceStockFacade commerceStockFacade) Creates an instance of the validator -
Method Summary
Methods inherited from class de.hybris.platform.ycommercewebservices.validator.DefaultStockSystemValidator
getCommerceStockFacade, validate
-
Constructor Details
-
DefaultStockPOSValidator
Creates an instance of the validator- Parameters:
commerceStockFacade- Commerce stock facade to be used in the validation
-
-
Method Details
-
validate
Validates stock availability for the product in the given point of service.Throws
StockSystemExceptionin case stock system is unavailable for the base site.Throws
LowStockExceptionin case entry stock is insufficient, includes information about entry number as an error subject. ThrowsProductLowStockExceptionin case product stock is insufficient.- Specified by:
validatein interfaceStockPOSValidator- Parameters:
baseSiteId- Id of base siteproductCode- Code of the productstoreName- Name of the point of serviceentryNumber- Number of entry in the cart
-