1 package org.apache.turbine.services.security.passive; 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.security.UserManager; 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 43 public class PassiveUserManager implements UserManager 44 { 45 50 public void init(Configuration conf) 51 { 52 } 54 55 64 public boolean accountExists(User user) 65 throws DataBackendException 66 { 67 throw new DataBackendException("PassiveUserManager knows no users"); 68 } 69 70 79 public boolean accountExists(String userName) 80 throws DataBackendException 81 { 82 throw new DataBackendException("PassiveUserManager knows no users"); 83 } 84 85 96 public User retrieve(String username) 97 throws UnknownEntityException, DataBackendException 98 { 99 throw new DataBackendException("PassiveUserManager knows no users"); 100 } 101 102 112 public User retrieveById(Object key) 113 throws UnknownEntityException, DataBackendException 114 { 115 throw new DataBackendException("PassiveUserManager knows no users"); 116 } 117 118 133 public User[] retrieve(Criteria criteria) 134 throws DataBackendException 135 { 136 throw new DataBackendException("PassiveUserManager knows no users"); 137 } 138 139 153 public List retrieveList(Criteria criteria) 154 throws DataBackendException 155 { 156 throw new DataBackendException("PassiveUserManager knows no users"); 157 } 158 159 175 public User retrieve(String username, String password) 176 throws PasswordMismatchException, UnknownEntityException, 177 DataBackendException 178 { 179 throw new DataBackendException("PassiveUserManager knows no users"); 180 } 181 182 192 public void store(User user) 193 throws UnknownEntityException, DataBackendException 194 { 195 throw new DataBackendException("PassiveUserManager does not support saving user data"); 196 } 197 198 210 public void saveOnSessionUnbind(User user) 211 throws UnknownEntityException, DataBackendException 212 { 213 throw new DataBackendException("PassiveUserManager does not support saving user data"); 214 } 215 216 230 public void authenticate(User user, String password) 231 throws PasswordMismatchException, UnknownEntityException, 232 DataBackendException 233 { 234 throw new DataBackendException("PassiveUserManager knows no users"); 235 } 236 237 246 public void createAccount(User user, String initialPassword) 247 throws EntityExistsException, DataBackendException 248 { 249 throw new DataBackendException("PassiveUserManager does not support" 250 + " creating accounts"); 251 } 252 253 260 public void removeAccount(User user) 261 throws UnknownEntityException, DataBackendException 262 { 263 throw new DataBackendException("PassiveUserManager does not support removing accounts"); 264 } 265 266 279 public void changePassword(User user, String oldPassword, 280 String newPassword) 281 throws PasswordMismatchException, UnknownEntityException, 282 DataBackendException 283 { 284 throw new DataBackendException("PassiveUserManager does not support setting passwords"); 285 } 286 287 302 public void forcePassword(User user, String password) 303 throws UnknownEntityException, DataBackendException 304 { 305 throw new DataBackendException("PassiveUserManager does not support setting passwords"); 306 } 307 } 308 | Popular Tags |