예제 #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);
 }