01: /*
02: * CoadunationLib: The coaduntion implementation library.
03: * Copyright (C) 2006 Rift IT Contracting
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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 getName();
46:
47: /**
48: * This method returns the user information for the given username. Note:
49: * this method must not throw an exception if the user is not found, it must
50: * instead return null.
51: *
52: *
53: * @param username The name of the user to retrieve information for.
54: * @return UserSession The user object for the given username.
55: * @exception UserException
56: */
57: public UserSession getUserInfo(String username)
58: throws UserException;
59: }
|