Class DefaultStockValidator
java.lang.Object
de.hybris.platform.commercewebservices.core.validator.DefaultStockSystemValidator
de.hybris.platform.commercewebservices.core.validator.DefaultStockValidator
- All Implemented Interfaces:
StockSystemValidator,StockValidator
Implementation of online stock validator that validates online product stock availability for the given site and entry number
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultStockValidator(CommerceStockFacade commerceStockFacade) Creates an instance of the validator -
Method Summary
Methods inherited from class de.hybris.platform.commercewebservices.core.validator.DefaultStockSystemValidator
getCommerceStockFacade, validate
-
Constructor Details
-
DefaultStockValidator
Creates an instance of the validator- Parameters:
commerceStockFacade- Commerce stock facade to be used in the validation
-
-
Method Details
-
validate
Validates the online product stock availability for the given site and entry number.Throws
StockSystemExceptionin case stock system is unavailable.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 interfaceStockValidator- Parameters:
baseSiteId- Id of base siteproductCode- Code of the productentryNumber- Number of entry in the cart
-