Class DefaultStockValidator
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.validator.DefaultStockSystemValidator
-
- de.hybris.platform.ycommercewebservices.validator.DefaultStockValidator
-
- All Implemented Interfaces:
StockSystemValidator,StockValidator
public class DefaultStockValidator extends DefaultStockSystemValidator implements StockValidator
Implementation of online stock validator that validates online product stock availability for the given site and entry number
-
-
Constructor Summary
Constructors Constructor Description DefaultStockValidator(CommerceStockFacade commerceStockFacade)Creates an instance of the validator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(java.lang.String baseSiteId, java.lang.String productCode, java.lang.Long entryNumber)Validates the online product stock availability for the given site and entry number.-
Methods inherited from class de.hybris.platform.ycommercewebservices.validator.DefaultStockSystemValidator
getCommerceStockFacade, validate
-
-
-
-
Constructor Detail
-
DefaultStockValidator
public DefaultStockValidator(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.Long entryNumber)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
-
-