KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snipsnap > user > UserManager


1 /*
2  * This file is part of "SnipSnap Wiki/Weblog".
3  *
4  * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
5  * All Rights Reserved.
6  *
7  * Please visit http://snipsnap.org/ for updates and contact.
8  *
9  * --LICENSE NOTICE--
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  * --LICENSE NOTICE--
24  */

25 package org.snipsnap.user;
26
27 import java.util.List JavaDoc;
28
29 /**
30  * User manager handles all register, creation and authentication of users.
31  * @author Stephan J. Schmidt
32  * @version $Id: UserManager.java 1256 2003-12-11 13:24:57Z leo $
33  */

34 public interface UserManager {
35   /**
36    * Get all users in the system
37    *
38    * @return
39    */

40   public List JavaDoc getAll();
41
42   /**
43    * Get the number of users in the system
44    * @return
45    */

46   public int getUserCount();
47
48   /**
49    * Create a new user
50    *
51    * @param login Login for the user
52    * @param passwd Password for the user
53    * @param email Email for the user
54    * @return
55    */

56   public User create(String JavaDoc login, String JavaDoc passwd, String JavaDoc email);
57
58   /**
59    * Store user
60    *
61    * @param user User to store
62    */

63   public void store(User user);
64
65   /**
66    * Store user delayed. Some unimportant
67    * changes to users are done every login etc.
68    * This does not to be persistet every time,
69    * only after some time the user is stored
70    *
71    * @param user User to store
72    */

73   public void delayedStore(User user);
74
75   /**
76    * Stores the user but does not change
77    * user data (like last modified time)
78    *
79    * @param user User to store
80    */

81   public void systemStore(User user);
82
83   /**
84    * Remove user from system
85    *
86    * @param user User to remove
87    */

88   public void remove(User user);
89
90   /**
91    * Load user from backend
92    *
93    * @param login Login of the user to load
94    * @return
95    */

96   public User load(String JavaDoc login);
97
98   /**
99    * Test if an user in the system exists
100    *
101    * @param login Login of the user to test
102    * @return
103    */

104   public boolean exists(String JavaDoc login);
105 }
106
Popular Tags