Пример #1
0
  public ShoppingCartSelection getShoppingCartSelection() {
    final Set<BookSelection> selections = shoppingCart.getSelections();

    final ShoppingCartSelection cartSelection = new ShoppingCartSelection();
    cartSelection.setSelections(selections);
    cartSelection.setPrice(priceCalculator.calculateTotal(selections));

    return cartSelection;
  }
Пример #2
0
 public BookSelection getSelection(long selectionId) {
   return shoppingCart.getSelection(selectionId);
 }
Пример #3
0
 public void updateBookSelection(long selectionId, int quantity) {
   shoppingCart.updateBookSelection(selectionId, quantity);
 }
Пример #4
0
 public void addBookSelection(BookSelection selection) {
   shoppingCart.addBookSelection(selection);
 }