Class ProductCommandService
java.lang.Object
com.dmasone.identity.catalog.application.ProductCommandService
- All Implemented Interfaces:
StockReservationService
Write-side catalog service. It is intentionally narrow: other modules can
reserve stock, but cannot update catalog rows or bypass the domain rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreserveStock(Long productId, int quantity) Reserve catalog stock for a product.
-
Constructor Details
-
ProductCommandService
-
-
Method Details
-
reserveStock
@Transactional @CacheEvict(cacheNames={"catalogProducts","catalogProduct"}, allEntries=true) public void reserveStock(Long productId, int quantity) Description copied from interface:StockReservationServiceReserve catalog stock for a product.- Specified by:
reserveStockin interfaceStockReservationService- Parameters:
productId- catalog product idquantity- positive quantity to reserve
-