1 11 12 package org.jivesoftware.messenger.user; 13 14 import java.util.Date ; 15 import java.util.Collection ; 16 import java.util.Set ; 17 18 23 public interface UserProvider { 24 25 32 public User loadUser(String username) throws UserNotFoundException; 33 34 46 public User createUser(String username, String password, String name, String email) 47 throws UserAlreadyExistsException; 48 49 56 public void deleteUser(String username); 57 58 63 public int getUserCount(); 64 65 74 public Collection <User> getUsers(); 75 76 91 public Collection <User> getUsers(int startIndex, int numResults); 92 93 103 public String getPassword(String username) throws UserNotFoundException, 104 UnsupportedOperationException ; 105 106 116 public void setPassword(String username, String password) 117 throws UserNotFoundException, UnsupportedOperationException ; 118 119 127 public void setName(String username, String name) throws UserNotFoundException; 128 129 138 public void setEmail(String username, String email) throws UserNotFoundException; 139 140 149 public void setCreationDate(String username, Date creationDate) throws UserNotFoundException; 150 151 160 public void setModificationDate(String username, Date modificationDate) 161 throws UserNotFoundException; 162 163 177 public Set <String > getSearchFields() throws UnsupportedOperationException ; 178 179 194 public Collection <User> findUsers(Set <String > fields, String query) 195 throws UnsupportedOperationException ; 196 197 220 public Collection <User> findUsers(Set <String > fields, String query, int startIndex, 221 int numResults) throws UnsupportedOperationException ; 222 223 229 public boolean isReadOnly(); 230 } | Popular Tags |