1 package org.apache.turbine.services.security; 2 3 18 19 import java.util.List ; 20 21 import org.apache.commons.configuration.Configuration; 22 23 import org.apache.torque.util.Criteria; 24 25 import org.apache.turbine.om.security.User; 26 import org.apache.turbine.services.InitializationException; 27 import org.apache.turbine.util.security.DataBackendException; 28 import org.apache.turbine.util.security.EntityExistsException; 29 import org.apache.turbine.util.security.PasswordMismatchException; 30 import org.apache.turbine.util.security.UnknownEntityException; 31 32 46 public interface UserManager 47 { 48 55 void init(Configuration conf) 56 throws InitializationException; 57 58 68 boolean accountExists(User user) 69 throws DataBackendException; 70 71 81 boolean accountExists(String userName) 82 throws DataBackendException; 83 84 95 User retrieve(String username) 96 throws UnknownEntityException, DataBackendException; 97 98 108 User retrieveById(Object key) 109 throws UnknownEntityException, DataBackendException; 110 111 126 User[] retrieve(Criteria criteria) throws DataBackendException; 127 128 142 List retrieveList(Criteria criteria) 143 throws DataBackendException; 144 145 159 User retrieve(String username, String password) 160 throws PasswordMismatchException, UnknownEntityException, 161 DataBackendException; 162 163 172 void store(User user) 173 throws UnknownEntityException, DataBackendException; 174 175 187 public void saveOnSessionUnbind(User user) 188 throws UnknownEntityException, DataBackendException; 189 190 202 void authenticate(User user, String password) 203 throws PasswordMismatchException, UnknownEntityException, 204 DataBackendException; 205 206 215 void createAccount(User user, String initialPassword) 216 throws EntityExistsException, DataBackendException; 217 218 226 void removeAccount(User user) 227 throws UnknownEntityException, DataBackendException; 228 229 240 void changePassword(User user, String oldPassword, 241 String newPassword) 242 throws PasswordMismatchException, UnknownEntityException, 243 DataBackendException; 244 245 259 void forcePassword(User user, String password) 260 throws UnknownEntityException, DataBackendException; 261 } 262 | Popular Tags |