public class CartUpdateStockChangeListener<P extends Product> extends Object implements ChangeListener<Object>
CartService
; that ensures SaleStrategy
locks products selected by a user for the CartService.CART_TYPE_SHOPPING
so that other users may not purchase the same product that is in the shoppers cart.
Cart
, sessionId as String} as the param
Constructor and Description |
---|
CartUpdateStockChangeListener(SaleStrategy saleStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
onChange(ChangeGenerator<Object> cartService,
Object param) |
public CartUpdateStockChangeListener(SaleStrategy saleStrategy)
public void onChange(ChangeGenerator<Object> cartService, Object param)
onChange
in interface ChangeListener<Object>
cartService
- as the generator that caused the change. Specially useful if the Listener is subscribing to multiple ChangeGenerator
sparam
- as the model change communicatedCopyright © 2018. All rights reserved.