1 package xpetstore.services.petstore.ejb; 2 3 import java.util.Date ; 4 import java.util.Map ; 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 userId, String password ); 20 21 Category getCategory( String categoryId ); 22 23 Page getCategories( int start, int count ); 24 25 Product getProduct( String productId ); 26 27 Product getProductByItem( String itemId ); 28 29 Page getProducts( String categoryId, int start, int count ); 30 31 Page searchProducts( String key, int start, int count ); 32 33 Item getItem( String itemId ); 34 35 Page getItems( String productId, int start, int count ); 36 37 String createCustomer( Customer customer ) throws DuplicateEmailException; 38 39 void updateCustomer( Customer customer ); 40 41 Customer getCustomer( String userId ); 42 43 Integer createOrder( String userId, Date orderDate, Map items ) throws CartEmptyOrderException; 44 45 Page getCustomerOrders( String userId, int start, int count ); 46 47 Order getOrder( Integer orderUId ); 48 49 Page getOrderItems( Integer orderUId, int start, int count ); 50 } 51 | Popular Tags |