1 18 package org.drftpd.tests; 19 20 import java.util.Collection ; 21 import java.util.List ; 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 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 (); 43 } 44 45 public User create(String username) throws UserFileException { 46 throw new UnsupportedOperationException (); 47 } 48 49 public boolean exists(String name) { 50 throw new UnsupportedOperationException (); 51 } 52 53 public Collection getAllGroups() throws UserFileException { 54 throw new UnsupportedOperationException (); 55 } 56 57 public List getAllUsers() throws UserFileException { 58 throw new UnsupportedOperationException (); 59 60 } 61 62 public Collection getAllUsersByGroup(String group) 63 throws UserFileException { 64 throw new UnsupportedOperationException (); 65 66 } 67 68 public User getUserByName(String name) 69 throws NoSuchUserException, UserFileException { 70 return _user; 71 } 72 public void setUser(User user) { 73 _user = user; 74 } 75 public User getUserByNameUnchecked(String username) 76 throws NoSuchUserException, UserFileException { 77 throw new UnsupportedOperationException (); 78 } 79 80 public void saveAll() throws UserFileException { 81 throw new UnsupportedOperationException (); 82 } 83 } 84 | Popular Tags |