in nuvem-samples/store-assets/src/main/java/services/ShoppingCartManager.java [102:114]
public void delete(String key) throws NotFoundException {
if (key == null || key.isEmpty()) {
documentService.delete(getCartKey());
} else {
Map<String, Item> cart = getUserShoppingCart();
Item item = cart.remove(key);
if (item == null) {
throw new NotFoundException(key);
}
documentService.put(getCartKey(), cart);
}
}