1 /*
2 * Demosys.
3 *
4 * Terms of license - http://opensource.org/licenses/apachepl.php
5 */
6 package org.demosys.web.user;
7 /***
8 * Service for the entity user.
9 */
10 public interface UserService {
11 /***
12 * Create a new User in the persistence layer.
13 *
14 * @param user a new user
15 *
16 * @throws InvalidUserException Failure during creation.
17 */
18 void newUser(UserView user) throws InvalidUserException, DuplicateUserException;
19
20
21 /***
22 * Update the user data.
23 *
24 * @param user the view containing the updated data
25 *
26 * @throws UnknownUserException User is unknown
27 * @throws InvalidUserException Failure during update.
28 */
29 void updateUser(UserView user) throws UnknownUserException, InvalidUserException;
30
31
32 /***
33 * Delete a user by its ID.
34 *
35 * @param id a user id
36 *
37 * @throws UnknownUserException id is an unknown user id.
38 */
39 void deleteUser(String id) throws UnknownUserException;
40
41
42 /***
43 * Retrieve a user by its ID.
44 *
45 * @param id a user id
46 *
47 * @return the user view
48 *
49 * @throws UnknownUserException id is an unknown user id.
50 */
51 UserView getUser(String id) throws UnknownUserException;
52
53
54 /***
55 * Retrieve all defined user.
56 * @return Users
57 */
58 UserViewList getAllUsers();
59 }
This page was automatically generated by Maven