This project has retired. For details please refer to its
Attic page.
JdoUser xref
1
2
3
4
5
6 package org.apache.archiva.redback.users.jdo;
7
8
9
10
11
12
13 public class JdoUser
14 implements org.apache.archiva.redback.users.User, java.io.Serializable
15 {
16
17
18
19
20
21
22
23
24 private String username;
25
26
27
28
29 private String password;
30
31
32
33
34 private String encodedPassword;
35
36
37
38
39 private String fullName;
40
41
42
43
44 private String email;
45
46
47
48
49 private java.util.Date lastPasswordChange;
50
51
52
53
54 private java.util.Date lastLoginDate;
55
56
57
58
59 private int countFailedLoginAttempts = 0;
60
61
62
63
64 private boolean locked = false;
65
66
67
68
69 private boolean permanent = false;
70
71
72
73
74 private boolean validated = false;
75
76
77
78
79 private boolean passwordChangeRequired = false;
80
81
82
83
84 private java.util.List
85
86
87
88
89 private java.util.Date accountCreationDate;
90
91
92
93
94
95
96
97
98
99
100
101 public void addPreviousEncodedPassword( String string )
102 {
103 getPreviousEncodedPasswords().add( string );
104 }
105
106
107
108
109
110
111
112 public boolean equals( Object other )
113 {
114 if ( this == other )
115 {
116 return true;
117 }
118
119 if ( !( other instanceof JdoUser ) )
120 {
121 return false;
122 }
123
124 JdoUser that = (JdoUser) other;
125 boolean result = true;
126
127 result = result && ( getUsername() == null ? that.getUsername() == null : getUsername().equals( that.getUsername() ) );
128 result = result && ( getPassword() == null ? that.getPassword() == null : getPassword().equals( that.getPassword() ) );
129 result = result && ( getEncodedPassword() == null ? that.getEncodedPassword() == null : getEncodedPassword().equals( that.getEncodedPassword() ) );
130 result = result && ( getFullName() == null ? that.getFullName() == null : getFullName().equals( that.getFullName() ) );
131 result = result && ( getEmail() == null ? that.getEmail() == null : getEmail().equals( that.getEmail() ) );
132 result = result && locked == that.locked;
133 result = result && permanent == that.permanent;
134 result = result && validated == that.validated;
135 result = result && passwordChangeRequired == that.passwordChangeRequired;
136
137 return result;
138 }
139
140
141
142
143
144
145 public java.util.Date getAccountCreationDate()
146 {
147 return this.accountCreationDate;
148 }
149
150
151
152
153
154
155 public int getCountFailedLoginAttempts()
156 {
157 return this.countFailedLoginAttempts;
158 }
159
160
161
162
163
164
165 public String getEmail()
166 {
167 return this.email;
168 }
169
170
171
172
173
174
175 public String getEncodedPassword()
176 {
177 return this.encodedPassword;
178 }
179
180
181
182
183
184
185 public String getFullName()
186 {
187 return this.fullName;
188 }
189
190
191
192
193
194
195 public java.util.Date getLastLoginDate()
196 {
197 return this.lastLoginDate;
198 }
199
200
201
202
203
204
205 public java.util.Date getLastPasswordChange()
206 {
207 return this.lastPasswordChange;
208 }
209
210
211
212
213
214
215 public String getPassword()
216 {
217 return this.password;
218 }
219
220
221
222
223
224
225 public java.util.List
226 {
227 if ( this.previousEncodedPasswords == null )
228 {
229 this.previousEncodedPasswords = new java.util.ArrayList
230 }
231
232 return this.previousEncodedPasswords;
233 }
234
235
236
237
238
239
240 public String getUsername()
241 {
242 return this.username;
243 }
244
245
246
247
248
249
250 public int hashCode()
251 {
252 int result = 17;
253
254 result = 37 * result + ( username != null ? username.hashCode() : 0 );
255 result = 37 * result + ( password != null ? password.hashCode() : 0 );
256 result = 37 * result + ( encodedPassword != null ? encodedPassword.hashCode() : 0 );
257 result = 37 * result + ( fullName != null ? fullName.hashCode() : 0 );
258 result = 37 * result + ( email != null ? email.hashCode() : 0 );
259 result = 37 * result + ( locked ? 0 : 1 );
260 result = 37 * result + ( permanent ? 0 : 1 );
261 result = 37 * result + ( validated ? 0 : 1 );
262 result = 37 * result + ( passwordChangeRequired ? 0 : 1 );
263
264 return result;
265 }
266
267
268
269
270
271
272 public boolean isLocked()
273 {
274 return this.locked;
275 }
276
277
278
279
280
281
282 public boolean isPasswordChangeRequired()
283 {
284 return this.passwordChangeRequired;
285 }
286
287
288
289
290
291
292 public boolean isPermanent()
293 {
294 return this.permanent;
295 }
296
297
298
299
300
301
302 public boolean isValidated()
303 {
304 return this.validated;
305 }
306
307
308
309
310
311
312 public void removePreviousEncodedPassword( String string )
313 {
314 getPreviousEncodedPasswords().remove( string );
315 }
316
317
318
319
320
321
322 public void setAccountCreationDate( java.util.Date accountCreationDate )
323 {
324 this.accountCreationDate = accountCreationDate;
325 }
326
327
328
329
330
331
332 public void setCountFailedLoginAttempts( int countFailedLoginAttempts )
333 {
334 this.countFailedLoginAttempts = countFailedLoginAttempts;
335 }
336
337
338
339
340
341
342 public void setEmail( String email )
343 {
344 this.email = email;
345 }
346
347
348
349
350
351
352 public void setEncodedPassword( String encodedPassword )
353 {
354 this.encodedPassword = encodedPassword;
355 }
356
357
358
359
360
361
362 public void setFullName( String fullName )
363 {
364 this.fullName = fullName;
365 }
366
367
368
369
370
371
372 public void setLastLoginDate( java.util.Date lastLoginDate )
373 {
374 this.lastLoginDate = lastLoginDate;
375 }
376
377
378
379
380
381
382 public void setLastPasswordChange( java.util.Date lastPasswordChange )
383 {
384 this.lastPasswordChange = lastPasswordChange;
385 }
386
387
388
389
390
391
392 public void setLocked( boolean locked )
393 {
394 this.locked = locked;
395 }
396
397
398
399
400
401
402 public void setPassword( String password )
403 {
404 this.password = password;
405 }
406
407
408
409
410
411
412 public void setPasswordChangeRequired( boolean passwordChangeRequired )
413 {
414 this.passwordChangeRequired = passwordChangeRequired;
415 }
416
417
418
419
420
421
422 public void setPermanent( boolean permanent )
423 {
424 this.permanent = permanent;
425 }
426
427
428
429
430
431
432 public void setPreviousEncodedPasswords( java.util.List
433 {
434 this.previousEncodedPasswords = previousEncodedPasswords;
435 }
436
437
438
439
440
441
442 public void setUsername( String username )
443 {
444 this.username = username;
445 }
446
447
448
449
450
451
452 public void setValidated( boolean validated )
453 {
454 this.validated = validated;
455 }
456
457
458
459
460
461
462 public java.lang.String toString()
463 {
464 StringBuffer buf = new StringBuffer( 128 );
465
466 buf.append( "username = '" );
467 buf.append( getUsername() );
468 buf.append( "'" );
469 buf.append( "\n" );
470 buf.append( "password = '" );
471 buf.append( getPassword() );
472 buf.append( "'" );
473 buf.append( "\n" );
474 buf.append( "encodedPassword = '" );
475 buf.append( getEncodedPassword() );
476 buf.append( "'" );
477 buf.append( "\n" );
478 buf.append( "fullName = '" );
479 buf.append( getFullName() );
480 buf.append( "'" );
481 buf.append( "\n" );
482 buf.append( "email = '" );
483 buf.append( getEmail() );
484 buf.append( "'" );
485 buf.append( "\n" );
486 buf.append( "locked = '" );
487 buf.append( isLocked() );
488 buf.append( "'" );
489 buf.append( "\n" );
490 buf.append( "permanent = '" );
491 buf.append( isPermanent() );
492 buf.append( "'" );
493 buf.append( "\n" );
494 buf.append( "validated = '" );
495 buf.append( isValidated() );
496 buf.append( "'" );
497 buf.append( "\n" );
498 buf.append( "passwordChangeRequired = '" );
499 buf.append( isPasswordChangeRequired() );
500 buf.append( "'" );
501
502 return buf.toString();
503 }
504
505
506 public JdoUser()
507 {
508
509 previousEncodedPasswords = new java.util.ArrayList<String>();
510 }
511 public String getUserManagerId()
512 {
513 return "jdo";
514 }
515
516
517 }