1 package ejava.examples.blpurchase.bl;
2
3 import java.util.List;
4
5 import ejava.examples.blpurchase.bo.Product;
6
7 /**
8 * The catalog maintains a view of the inventory known to our application.
9 */
10 public interface Catalog {
11
12 /**
13 * Returns a list of products in the catalog chunked into page sizes.
14 * @param offset
15 * @param limit
16 */
17 List<Product> getProducts(int offset, int limit);
18
19 /**
20 * Adds the selected product to the users' shopping cart and returns
21 * the count of items.
22 * @param id
23 * @param validEmail
24 */
25 int addToCart(int id, String validEmail);
26 }