org.books.model
Class Bookstore

java.lang.Object
  extended by org.books.model.Bookstore

public class Bookstore
extends java.lang.Object

The class Bookstore implements a bookstore.

Version:
1.0
Author:
Stephan Fischli

Method Summary
 void cancelOrder(java.lang.Integer number)
          Cancels an order.
static Bookstore getInstance()
          Returns the bookstore instance.
 java.util.List<Order> getOrders()
          Returns the orders.
 Order orderBooks(AddressBean address, CreditCardBean creditCard, java.util.List<LineItem> items)
          Orders books.
 java.util.List<Book> searchBooks(java.lang.String title, java.lang.String author, java.lang.String publisher)
          Searches for books.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Bookstore getInstance()
Returns the bookstore instance.


searchBooks

public java.util.List<Book> searchBooks(java.lang.String title,
                                        java.lang.String author,
                                        java.lang.String publisher)
Searches for books.


orderBooks

public Order orderBooks(AddressBean address,
                        CreditCardBean creditCard,
                        java.util.List<LineItem> items)
                 throws CreditCardExpiredException
Orders books.

Throws:
CreditCardExpiredException

getOrders

public java.util.List<Order> getOrders()
Returns the orders.


cancelOrder

public void cancelOrder(java.lang.Integer number)
                 throws OrderNotFoundException,
                        OrderNotCancelableException
Cancels an order.

Throws:
OrderNotFoundException
OrderNotCancelableException


Copyright © 2007 - bouquet dot ch, 3032 Hinterkappelen. All Rights Reserved.