KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > services > petstore > ejb > Petstore


1 package xpetstore.services.petstore.ejb;
2
3 import java.util.Date JavaDoc;
4 import java.util.Map JavaDoc;
5
6 import xpetstore.domain.catalog.ejb.Category;
7 import xpetstore.domain.catalog.ejb.Item;
8 import xpetstore.domain.catalog.ejb.Product;
9 import xpetstore.domain.customer.ejb.Customer;
10 import xpetstore.domain.order.ejb.Order;
11
12 import xpetstore.services.petstore.exceptions.CartEmptyOrderException;
13 import xpetstore.services.petstore.exceptions.DuplicateEmailException;
14 import xpetstore.util.Page;
15
16
17 public interface Petstore
18 {
19     boolean authenticate( String JavaDoc userId, String JavaDoc password );
20    
21     Category getCategory( String JavaDoc categoryId );
22
23     Page getCategories( int start, int count );
24
25     Product getProduct( String JavaDoc productId );
26     
27     Product getProductByItem( String JavaDoc itemId );
28
29     Page getProducts( String JavaDoc categoryId, int start, int count );
30
31     Page searchProducts( String JavaDoc key, int start, int count );
32
33     Item getItem( String JavaDoc itemId );
34
35     Page getItems( String JavaDoc productId, int start, int count );
36     
37     String JavaDoc createCustomer( Customer customer ) throws DuplicateEmailException;
38        
39     void updateCustomer( Customer customer );
40
41     Customer getCustomer( String JavaDoc userId );
42
43     Integer JavaDoc createOrder( String JavaDoc userId, Date JavaDoc orderDate, Map JavaDoc items ) throws CartEmptyOrderException;
44
45     Page getCustomerOrders( String JavaDoc userId, int start, int count );
46
47     Order getOrder( Integer JavaDoc orderUId );
48  
49     Page getOrderItems( Integer JavaDoc orderUId, int start, int count );
50 }
51
Popular Tags