KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > drftpd > tests > DummyUserManager


1 /*
2  * This file is part of DrFTPD, Distributed FTP Daemon.
3  *
4  * DrFTPD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * DrFTPD is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with DrFTPD; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package org.drftpd.tests;
19
20 import java.util.Collection JavaDoc;
21 import java.util.List JavaDoc;
22
23 import net.sf.drftpd.master.ConnectionManager;
24 import net.sf.drftpd.master.usermanager.NoSuchUserException;
25 import net.sf.drftpd.master.usermanager.User;
26 import net.sf.drftpd.master.usermanager.UserFileException;
27 import net.sf.drftpd.master.usermanager.UserManager;
28
29 /**
30  * @author mog
31  * @version $Id: DummyUserManager.java,v 1.1 2004/05/16 18:07:31 mog Exp $
32  */

33 public class DummyUserManager implements UserManager {
34
35     private User _user;
36
37     public DummyUserManager() {
38         super();
39     }
40
41     public void init(ConnectionManager mgr) {
42         throw new UnsupportedOperationException JavaDoc();
43     }
44
45     public User create(String JavaDoc username) throws UserFileException {
46         throw new UnsupportedOperationException JavaDoc();
47     }
48
49     public boolean exists(String JavaDoc name) {
50         throw new UnsupportedOperationException JavaDoc();
51     }
52
53     public Collection JavaDoc getAllGroups() throws UserFileException {
54         throw new UnsupportedOperationException JavaDoc();
55     }
56
57     public List JavaDoc getAllUsers() throws UserFileException {
58         throw new UnsupportedOperationException JavaDoc();
59
60     }
61
62     public Collection JavaDoc getAllUsersByGroup(String JavaDoc group)
63         throws UserFileException {
64         throw new UnsupportedOperationException JavaDoc();
65
66     }
67
68     public User getUserByName(String JavaDoc name)
69         throws NoSuchUserException, UserFileException {
70         return _user;
71     }
72     public void setUser(User user) {
73         _user = user;
74     }
75     public User getUserByNameUnchecked(String JavaDoc username)
76         throws NoSuchUserException, UserFileException {
77         throw new UnsupportedOperationException JavaDoc();
78     }
79
80     public void saveAll() throws UserFileException {
81         throw new UnsupportedOperationException JavaDoc();
82     }
83 }
84
Popular Tags