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
Constructors Constructor Description DefaultStockPOSValidator(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.String storeName, java.lang.Long entryNumber)Validates stock availability for the product in the given point of service.-
Methods inherited from class de.hybris.platform.ycommercewebservices.validator.DefaultStockSystemValidator
getCommerceStockFacade, validate
-
-
-
-
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
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
-
-