summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java')
-rw-r--r--Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java
new file mode 100644
index 0000000..f34575d
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/shop/logic/UserManager.java
@@ -0,0 +1,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();
+}