9c488b35c6cf44a12f3956becaa343ff3b8216f7
[staff/due1/sed-hs15-srs-purple.git] / src / main / java / ch / bfh / ti / srs / datahandler / DataHandler.java
1 /*
2 * Copyright (c) 2015 Berner Fachhochschule, Switzerland.
3 *
4 * Project Smart Reservation System.
5 *
6 * Distributable under GPL license. See terms of license at gnu.org.
7 */
8 package ch.bfh.ti.srs.datahandler;
9
10 import ch.bfh.ti.srs.core.User;
11
12 /**
13 * @author Michael Grossen
14 */
15 public interface DataHandler {
16
17 /**
18 * Finds the user by userName param in the Datacontext and returns the User object or null if not found
19 *
20 * @param userName userName of the user you are looking for
21 * @return <code>User</code>user object
22 * <code>null</code>if no user found with this userName
23 */
24 public User findUser(String userName);
25
26 /**
27 * Adds a user to the Datacontext from a given user object
28 *
29 * @param user User object
30 * @throws Exception
31 */
32 public void addUser(User user) throws Exception;
33 }