summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java
blob: f34575da6d27625dbcbffb56cf5711d370555a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package examples.shop.logic;

import java.util.List;

import examples.shop.impl.entity.Customer;

/**
 * This is the UserManager interface.
 */
public interface UserManager {

    /**
     * It uses the customer entity bean to crate a record in the databse
     */
    public Customer createUser(String customerId, String name, String password,
            String address);

    /**
     * Returns an user object for the given customer id. It uses customer entity
     * bean to retrieve the user record.
     */
    public Customer getUser(String customerId);

    /**
     * Authenticate the user.
     */
    public boolean validateUser(String login, String password)
            throws InvalidPasswordException;

    /**
     * Demo lookup
     * 
     * @return
     */
    public List<Customer> findAllCustomers();

    public void removeAllCustomers();
}