KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > lib > security > user > UserStoreConnector


1 /*
2  * CoadunationLib: The coaduntion implementation library.
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * UserStoreConnector.java
20  *
21  * This interface supplies the ability to connect to the user data store. This
22  * data store could be Database, Text File, XML File, LDAP etc.
23  */

24
25 // The package path
26
package com.rift.coad.lib.security.user;
27
28 // coadunation imports
29
import com.rift.coad.lib.security.login.LoginModule;
30 import com.rift.coad.lib.security.UserSession;
31
32 /**
33  * This interface supplies the ability to connect to the user data store. This
34  * data store could be Database, Text File, XML File, LDAP etc.
35  *
36  * @author Brett Chaldecott
37  */

38 public interface UserStoreConnector extends LoginModule {
39     
40     /**
41      * This method returns the name of the user store.
42      *
43      * @return The string containing the name of the user store.
44      */

45     public String JavaDoc getName();
46     
47     
48     /**
49      * This method returns the user information for the given username. Note:
50      * this method must not throw an exception if the user is not found, it must
51      * instead return null.
52      *
53      *
54      * @param username The name of the user to retrieve information for.
55      * @return UserSession The user object for the given username.
56      * @exception UserException
57      */

58     public UserSession getUserInfo(String JavaDoc username) throws UserException;
59 }
60
Popular Tags