Jean-Francois Leveque

Refactoring de User en Account (fin sur le nom des classes et fichiers).

...@@ -38,7 +38,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -38,7 +38,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
38 */ 38 */
39 39
40 /** 40 /**
41 - * The mask used for user name. 41 + * The mask used for account name.
42 */ 42 */
43 private DisplayNameMask displayNameMask; 43 private DisplayNameMask displayNameMask;
44 /* 44 /*
...@@ -49,7 +49,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -49,7 +49,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
49 } 49 }
50 */ 50 */
51 /** 51 /**
52 - * @return the user's name as desired. By default, return the complete name. 52 + * @return the account's name as desired. By default, return the complete name.
53 * see org.roliste.data.db.NameMask#mask(org.roliste.data.DbMaskableEntity) 53 * see org.roliste.data.db.NameMask#mask(org.roliste.data.DbMaskableEntity)
54 */ 54 */
55 public String getDisplayName() 55 public String getDisplayName()
...@@ -61,7 +61,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -61,7 +61,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
61 } 61 }
62 62
63 /** 63 /**
64 - * Returns the user's name mask. 64 + * Returns the account's name mask.
65 * @return the mask. 65 * @return the mask.
66 * see #setNameMask(NameMask) 66 * see #setNameMask(NameMask)
67 * hibernate.property 67 * hibernate.property
...@@ -76,7 +76,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -76,7 +76,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
76 } 76 }
77 77
78 /** 78 /**
79 - * Initializes the user's name mask. 79 + * Initializes the account's name mask.
80 * @param mask the new {link org.roliste.data.db.NameMask}. 80 * @param mask the new {link org.roliste.data.db.NameMask}.
81 * see #getNameMask() 81 * see #getNameMask()
82 */ 82 */
...@@ -87,43 +87,43 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -87,43 +87,43 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
87 87
88 // TODO Faire ailleurs les contrôles de chaîne vide sur : username, password, firstname, lastname, nickname, email, text 88 // TODO Faire ailleurs les contrôles de chaîne vide sur : username, password, firstname, lastname, nickname, email, text
89 /** 89 /**
90 - * The user identifier. 90 + * The account identifier.
91 */ 91 */
92 private String username; 92 private String username;
93 93
94 /** 94 /**
95 - * The user password. 95 + * The account password.
96 */ 96 */
97 private String password; 97 private String password;
98 98
99 /** 99 /**
100 - * The user first name. 100 + * The account first name.
101 */ 101 */
102 private String firstName; 102 private String firstName;
103 103
104 /** 104 /**
105 - * The user last name. 105 + * The account last name.
106 */ 106 */
107 private String lastName; 107 private String lastName;
108 108
109 /** 109 /**
110 - * The user nick name. 110 + * The account nick name.
111 */ 111 */
112 private String nickname; 112 private String nickname;
113 113
114 /** 114 /**
115 - * The user email address. 115 + * The account email address.
116 */ 116 */
117 private String email; 117 private String email;
118 118
119 /** 119 /**
120 - * The {link org.roliste.data.db.AccountRole}s for this user. 120 + * The {link org.roliste.data.db.AccountRole}s for this account.
121 */ 121 */
122 @ManyToMany(fetch = FetchType.EAGER) 122 @ManyToMany(fetch = FetchType.EAGER)
123 private List<AccountRole> roles; 123 private List<AccountRole> roles;
124 124
125 /** 125 /**
126 - * Retrieves the list of {@link AccountRole}s for this user. 126 + * Retrieves the list of {@link AccountRole}s for this account.
127 * SHALL be used as a read-only attribute. In particular, avoid 127 * SHALL be used as a read-only attribute. In particular, avoid
128 * using {@link List#add(Object)} or {@link List#remove(Object)} on 128 * using {@link List#add(Object)} or {@link List#remove(Object)} on
129 * the returned value without caution. 129 * the returned value without caution.
...@@ -151,7 +151,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -151,7 +151,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
151 } 151 }
152 152
153 /** 153 /**
154 - * Lists the list of {@link AccountRole}s for this user. 154 + * Lists the list of {@link AccountRole}s for this account.
155 * @param roles the new {@link List} of {@link AccountRole}s. Shall not be <code>null</code>. 155 * @param roles the new {@link List} of {@link AccountRole}s. Shall not be <code>null</code>.
156 * @throws NullPointerException if roles is <code>null</code>. 156 * @throws NullPointerException if roles is <code>null</code>.
157 * @see #getRoles() 157 * @see #getRoles()
...@@ -168,7 +168,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -168,7 +168,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
168 } 168 }
169 169
170 /** 170 /**
171 - * Add the user to a given {@link AccountRole}s. 171 + * Add the account to a given {@link AccountRole}s.
172 * @param role the new {@link AccountRole}. Ignored if <code>null</code>. 172 * @param role the new {@link AccountRole}. Ignored if <code>null</code>.
173 * @see #getRoles() 173 * @see #getRoles()
174 * @see #setRoles(List) 174 * @see #setRoles(List)
...@@ -187,7 +187,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -187,7 +187,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
187 } 187 }
188 */ 188 */
189 /** 189 /**
190 - * Remove the user from a given {@link AccountRole}s. 190 + * Remove the account from a given {@link AccountRole}s.
191 * @param role the {@link AccountRole} this {@link Account} will lose. Ignored if <code>null</code>. 191 * @param role the {@link AccountRole} this {@link Account} will lose. Ignored if <code>null</code>.
192 * @see #getRoles() 192 * @see #getRoles()
193 * @see #setRoles(List) 193 * @see #setRoles(List)
...@@ -206,23 +206,23 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -206,23 +206,23 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
206 } 206 }
207 */ 207 */
208 /** 208 /**
209 - * The user anonymous status. 209 + * The account anonymous status.
210 - * If anonymous, user cannot be contacted through email. 210 + * If anonymous, account cannot be contacted through email.
211 */ 211 */
212 private boolean anonymous; 212 private boolean anonymous;
213 213
214 /** 214 /**
215 - * The user validation status. 215 + * The account validation status.
216 */ 216 */
217 private boolean visible; 217 private boolean visible;
218 218
219 /** 219 /**
220 - * The user was activated at least once. 220 + * The account was activated at least once.
221 */ 221 */
222 private boolean activated; 222 private boolean activated;
223 223
224 /** 224 /**
225 - * The user provides critics for archive. 225 + * The account provides critics for archive.
226 */ 226 */
227 private boolean criticProvider; 227 private boolean criticProvider;
228 228
...@@ -232,12 +232,12 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -232,12 +232,12 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
232 private String presentation; 232 private String presentation;
233 233
234 /** 234 /**
235 - * The {@link org.roliste.data.db.BookDetails}s in this user's collection. 235 + * The {@link org.roliste.data.db.BookDetails}s in this account's collection.
236 */ 236 */
237 // private List<BookDetails> _collection; 237 // private List<BookDetails> _collection;
238 238
239 /** 239 /**
240 - * Retrieves the list of {@link org.roliste.data.db.BookDetails}s in this user's collection. 240 + * Retrieves the list of {@link org.roliste.data.db.BookDetails}s in this account's collection.
241 * SHALL be used as a read-only attribute. In particular, avoid using {@link List#add(Object)} 241 * SHALL be used as a read-only attribute. In particular, avoid using {@link List#add(Object)}
242 * or {@link List#remove(Object)} on the returned value without caution. 242 * or {@link List#remove(Object)} on the returned value without caution.
243 * @return a {@link List} of {@link org.roliste.data.db.BookDetails}. Shall not be <code>null</code>. 243 * @return a {@link List} of {@link org.roliste.data.db.BookDetails}. Shall not be <code>null</code>.
...@@ -263,7 +263,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -263,7 +263,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
263 } 263 }
264 */ 264 */
265 /** 265 /**
266 - * Lists the list of {@link org.roliste.data.db.BookDetails}s in this user's collection. 266 + * Lists the list of {@link org.roliste.data.db.BookDetails}s in this account's collection.
267 * @param collec the new {@link List} of {@link org.roliste.data.db.BookDetails}s. Shall not be <code>null</code>. 267 * @param collec the new {@link List} of {@link org.roliste.data.db.BookDetails}s. Shall not be <code>null</code>.
268 * @throws NullPointerException if collec is <code>null</code>. 268 * @throws NullPointerException if collec is <code>null</code>.
269 * @see #getCollection() 269 * @see #getCollection()
...@@ -280,7 +280,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -280,7 +280,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
280 } 280 }
281 */ 281 */
282 /** 282 /**
283 - * Add a book to the user's collection. 283 + * Add a book to the account's collection.
284 * @param book the new {@link org.roliste.data.db.BookDetails}. Ignored if <code>null</code>. 284 * @param book the new {@link org.roliste.data.db.BookDetails}. Ignored if <code>null</code>.
285 * @see #getCollection() 285 * @see #getCollection()
286 * @see #setCollection(List) 286 * @see #setCollection(List)
...@@ -299,7 +299,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -299,7 +299,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
299 } 299 }
300 */ 300 */
301 /** 301 /**
302 - * Remove a book from user's collection. 302 + * Remove a book from account's collection.
303 * @param book the {@link org.roliste.data.db.BookDetails} this {@link Account} will lose. Ignored if <code>null</code>. 303 * @param book the {@link org.roliste.data.db.BookDetails} this {@link Account} will lose. Ignored if <code>null</code>.
304 * @see #getCollection() 304 * @see #getCollection()
305 * @see #setCollection(List) 305 * @see #setCollection(List)
...@@ -318,14 +318,14 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -318,14 +318,14 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
318 } 318 }
319 */ 319 */
320 /** 320 /**
321 - * The {@link org.roliste.data.db.Traceable}s delegated to this user. 321 + * The {@link org.roliste.data.db.Traceable}s delegated to this account.
322 */ 322 */
323 // private List<Traceable> _delegations; 323 // private List<Traceable> _delegations;
324 324
325 /** 325 /**
326 - * Retrieves the list of delegations for this user. 326 + * Retrieves the list of delegations for this account.
327 * Each delegation is a link to a {@link org.roliste.data.db.Traceable} object. 327 * Each delegation is a link to a {@link org.roliste.data.db.Traceable} object.
328 - * A user having delegation may update field values for delegated object. 328 + * A account having delegation may update field values for delegated object.
329 * @return a {@link List} of {@link AccountRole}. Shall not be <code>null</code>. SHALL be used as a 329 * @return a {@link List} of {@link AccountRole}. Shall not be <code>null</code>. SHALL be used as a
330 * read-only attribute. In particular, avoid using {@link List#add(Object)} or {@link List#remove(Object)} 330 * read-only attribute. In particular, avoid using {@link List#add(Object)} or {@link List#remove(Object)}
331 * on the returned value without caution. 331 * on the returned value without caution.
...@@ -352,7 +352,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -352,7 +352,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
352 } 352 }
353 */ 353 */
354 /** 354 /**
355 - * Sets the list of delegations for this user. 355 + * Sets the list of delegations for this account.
356 * @param objects the new {@link List} of delegated {@link Traceable}. Shall not be <code>null</code>. 356 * @param objects the new {@link List} of delegated {@link Traceable}. Shall not be <code>null</code>.
357 * @throws NullPointerException if objects is <code>null</code>. 357 * @throws NullPointerException if objects is <code>null</code>.
358 * @see #getDelegations() 358 * @see #getDelegations()
...@@ -369,7 +369,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -369,7 +369,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
369 } 369 }
370 */ 370 */
371 /** 371 /**
372 - * Give delegation on a given {@link Traceable} to this user. 372 + * Give delegation on a given {@link Traceable} to this account.
373 * @param object the new delegation. Ignored if <code>null</code>. 373 * @param object the new delegation. Ignored if <code>null</code>.
374 * @see #getDelegations() 374 * @see #getDelegations()
375 * @see #setDelegations(List) 375 * @see #setDelegations(List)
...@@ -388,7 +388,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -388,7 +388,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
388 } 388 }
389 */ 389 */
390 /** 390 /**
391 - * Remove delegation on a given {@link Traceable} from this user. 391 + * Remove delegation on a given {@link Traceable} from this account.
392 * @param object the delegation this {@link Account} will lose. Ignored if <code>null</code>. 392 * @param object the delegation this {@link Account} will lose. Ignored if <code>null</code>.
393 * @see #getDelegations() 393 * @see #getDelegations()
394 * @see #setDelegations(List) 394 * @see #setDelegations(List)
...@@ -407,7 +407,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -407,7 +407,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
407 } 407 }
408 */ 408 */
409 /** 409 /**
410 - * Clear all delegations for this user. 410 + * Clear all delegations for this account.
411 */ 411 */
412 /* 412 /*
413 public void clearDelegations() 413 public void clearDelegations()
...@@ -423,13 +423,13 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -423,13 +423,13 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
423 } 423 }
424 */ 424 */
425 /** 425 /**
426 - * The list of attributes / properties for this user. 426 + * The list of attributes / properties for this account.
427 */ 427 */
428 @OneToMany(mappedBy = "account") 428 @OneToMany(mappedBy = "account")
429 private List<AccountAttribute> accountAttributes; 429 private List<AccountAttribute> accountAttributes;
430 430
431 /** 431 /**
432 - * Retrieve this user's attributes. 432 + * Retrieve this account's attributes.
433 * @hibernate.one-to-many 433 * @hibernate.one-to-many
434 * class="org.roliste.data.db.AccountAttribute" 434 * class="org.roliste.data.db.AccountAttribute"
435 * @hibernate.bag 435 * @hibernate.bag
...@@ -438,7 +438,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -438,7 +438,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
438 * inverse="true" 438 * inverse="true"
439 * @hibernate.key 439 * @hibernate.key
440 * column="ID_UTILISATEUR" 440 * column="ID_UTILISATEUR"
441 - * @return a {@link java.util.List} of user attributes linked to this. Shall not be <code>null</code>. 441 + * @return a {@link java.util.List} of account attributes linked to this. Shall not be <code>null</code>.
442 * @see #setAttributes(java.util.List) 442 * @see #setAttributes(java.util.List)
443 */ 443 */
444 444
...@@ -448,7 +448,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -448,7 +448,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
448 } 448 }
449 449
450 /** 450 /**
451 - * @param attribs the List of attributes for this user. 451 + * @param attribs the List of attributes for this account.
452 * @see #getAttributes() 452 * @see #getAttributes()
453 */ 453 */
454 454
...@@ -458,12 +458,12 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -458,12 +458,12 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
458 } 458 }
459 459
460 /** 460 /**
461 - * The {@link org.roliste.data.db.GamingEvent}s this user's visited. 461 + * The {@link org.roliste.data.db.GamingEvent}s this account's visited.
462 */ 462 */
463 // private Set<GamingEvent> _visitedEvents = new HashSet<GamingEvent>(); 463 // private Set<GamingEvent> _visitedEvents = new HashSet<GamingEvent>();
464 464
465 /** 465 /**
466 - * Retrieves the list of {@link GamingEvent}s visited by this user. 466 + * Retrieves the list of {@link GamingEvent}s visited by this account.
467 * SHALL be used as a read-only attribute. In particular, avoid 467 * SHALL be used as a read-only attribute. In particular, avoid
468 * using {@link Set#add(Object)} or {@link Set#remove(Object)} on 468 * using {@link Set#add(Object)} or {@link Set#remove(Object)} on
469 * the returned value without caution. 469 * the returned value without caution.
...@@ -487,7 +487,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -487,7 +487,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
487 } 487 }
488 */ 488 */
489 /** 489 /**
490 - * Sets the list of {link GamingEvent}s for this user. 490 + * Sets the list of {link GamingEvent}s for this account.
491 * param events the new {@link Set} of {link GamingEvent}s. May be 491 * param events the new {@link Set} of {link GamingEvent}s. May be
492 * <code>null</code> (we don't handle the relation from this side). 492 * <code>null</code> (we don't handle the relation from this side).
493 * see #getVisitedEvents() 493 * see #getVisitedEvents()
...@@ -507,7 +507,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -507,7 +507,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
507 } 507 }
508 508
509 /** 509 /**
510 - * Returns the user identifier. 510 + * Returns the account identifier.
511 * @return the {@link String} identifier. 511 * @return the {@link String} identifier.
512 * @see #setUsername(String) 512 * @see #setUsername(String)
513 * hibernate.property 513 * hibernate.property
...@@ -522,7 +522,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -522,7 +522,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
522 } 522 }
523 523
524 /** 524 /**
525 - * Initializes the user identifier. 525 + * Initializes the account identifier.
526 * @param name the new {@link String} identifier. 526 * @param name the new {@link String} identifier.
527 * @see #getUsername() 527 * @see #getUsername()
528 */ 528 */
...@@ -530,7 +530,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -530,7 +530,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
530 this.username = name; 530 this.username = name;
531 } 531 }
532 /** 532 /**
533 - * Returns the user password. 533 + * Returns the account password.
534 * @return the {@link String} password. 534 * @return the {@link String} password.
535 * @see #setPassword(String) 535 * @see #setPassword(String)
536 * hibernate.property 536 * hibernate.property
...@@ -544,7 +544,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -544,7 +544,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
544 } 544 }
545 545
546 /** 546 /**
547 - * Initializes the user password. 547 + * Initializes the account password.
548 * @param pwd the new {@link String} password. 548 * @param pwd the new {@link String} password.
549 * @see #getPassword() 549 * @see #getPassword()
550 */ 550 */
...@@ -553,7 +553,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -553,7 +553,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
553 } 553 }
554 554
555 /** 555 /**
556 - * Returns the user full first name. 556 + * Returns the account full first name.
557 * @return the {@link String} first name. 557 * @return the {@link String} first name.
558 * @see #setFirstName(String) 558 * @see #setFirstName(String)
559 * hibernate.property 559 * hibernate.property
...@@ -567,7 +567,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -567,7 +567,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
567 } 567 }
568 568
569 /** 569 /**
570 - * Initializes the user first name. 570 + * Initializes the account first name.
571 * @param name the new {@link String} first name. 571 * @param name the new {@link String} first name.
572 * @see #getFirstName() 572 * @see #getFirstName()
573 */ 573 */
...@@ -576,7 +576,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -576,7 +576,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
576 } 576 }
577 577
578 /** 578 /**
579 - * Returns the user full last name. 579 + * Returns the account full last name.
580 * @return the {@link String} last name. 580 * @return the {@link String} last name.
581 * @see #setLastName(String) 581 * @see #setLastName(String)
582 * hibernate.property 582 * hibernate.property
...@@ -590,7 +590,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -590,7 +590,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
590 } 590 }
591 591
592 /** 592 /**
593 - * Initializes the user last name. 593 + * Initializes the account last name.
594 * @param name the new {@link String} last name. 594 * @param name the new {@link String} last name.
595 * @see #getLastName() 595 * @see #getLastName()
596 */ 596 */
...@@ -599,7 +599,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -599,7 +599,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
599 } 599 }
600 600
601 /** 601 /**
602 - * Returns the user full screen name. 602 + * Returns the account full screen name.
603 * @return the {@link String} screen name. 603 * @return the {@link String} screen name.
604 * @see #setNickName(String) 604 * @see #setNickName(String)
605 * hibernate.property 605 * hibernate.property
...@@ -612,7 +612,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -612,7 +612,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
612 } 612 }
613 613
614 /** 614 /**
615 - * Initializes the user screen name. 615 + * Initializes the account screen name.
616 * @param name the new {@link String} screen name. 616 * @param name the new {@link String} screen name.
617 * @see #getNickName() 617 * @see #getNickName()
618 */ 618 */
...@@ -621,7 +621,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -621,7 +621,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
621 } 621 }
622 622
623 /** 623 /**
624 - * Returns the user email. 624 + * Returns the account email.
625 * @return the {@link String} email. 625 * @return the {@link String} email.
626 * @see #setEmail(String) 626 * @see #setEmail(String)
627 * hibernate.property 627 * hibernate.property
...@@ -636,7 +636,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -636,7 +636,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
636 } 636 }
637 637
638 /** 638 /**
639 - * Initializes the user email. 639 + * Initializes the account email.
640 * @param address the new {@link String} email. 640 * @param address the new {@link String} email.
641 * @see #getEmail() 641 * @see #getEmail()
642 */ 642 */
...@@ -645,7 +645,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -645,7 +645,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
645 } 645 }
646 646
647 /** 647 /**
648 - * Indicates if the user is anonymous. 648 + * Indicates if the account is anonymous.
649 * Anonymous users' email and first/last name won't be shown. 649 * Anonymous users' email and first/last name won't be shown.
650 * @return the anonymous flag. 650 * @return the anonymous flag.
651 * @see #setAnonymous(boolean) 651 * @see #setAnonymous(boolean)
...@@ -658,7 +658,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -658,7 +658,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
658 } 658 }
659 659
660 /** 660 /**
661 - * Initializes the user anonymous flag. 661 + * Initializes the account anonymous flag.
662 * @param anonymous the new flag value. 662 * @param anonymous the new flag value.
663 * @see #isAnonymous 663 * @see #isAnonymous
664 */ 664 */
...@@ -682,7 +682,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -682,7 +682,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
682 } 682 }
683 683
684 /** 684 /**
685 - * Indicates if the user was activated at least once. 685 + * Indicates if the account was activated at least once.
686 * @return the activation flag. 686 * @return the activation flag.
687 * @see #setCriticProvider(boolean) 687 * @see #setCriticProvider(boolean)
688 * hibernate.property 688 * hibernate.property
...@@ -694,7 +694,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -694,7 +694,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
694 } 694 }
695 695
696 /** 696 /**
697 - * Initializes the user activation flag. 697 + * Initializes the account activation flag.
698 * @param active the new flag value. 698 * @param active the new flag value.
699 * @see #isActivated 699 * @see #isActivated
700 */ 700 */
...@@ -703,7 +703,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -703,7 +703,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
703 } 703 }
704 704
705 /** 705 /**
706 - * Indicates if the user provides critics for archives. 706 + * Indicates if the account provides critics for archives.
707 * @return the critics provider flag. 707 * @return the critics provider flag.
708 * @see #setCriticProvider(boolean) 708 * @see #setCriticProvider(boolean)
709 * hibernate.property 709 * hibernate.property
...@@ -724,7 +724,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -724,7 +724,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
724 } 724 }
725 725
726 /** 726 /**
727 - * Returns the HTML text presentation for this user. 727 + * Returns the HTML text presentation for this account.
728 * @return the {@link String} HTML text. 728 * @return the {@link String} HTML text.
729 * @see #setPresentation(String) 729 * @see #setPresentation(String)
730 * hibernate.property 730 * hibernate.property
...@@ -747,7 +747,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements ...@@ -747,7 +747,7 @@ public class Account /* extends org.roliste.data.DbTraceableEntity */ implements
747 } 747 }
748 748
749 /** 749 /**
750 - * The user submission date. 750 + * The account submission date.
751 */ 751 */
752 private Date creationDate; 752 private Date creationDate;
753 753
......
...@@ -6,7 +6,7 @@ import java.util.Set; ...@@ -6,7 +6,7 @@ import java.util.Set;
6 import javax.persistence.*; 6 import javax.persistence.*;
7 7
8 /** 8 /**
9 - * The database representation of a user role or group. 9 + * The database representation of a account role or group.
10 * A given {@link Account} may be part of one or more {@link AccountRole}. 10 * A given {@link Account} may be part of one or more {@link AccountRole}.
11 * <br/> 11 * <br/>
12 * Warning: due to laziness of mapped objects, private attributes of all DB entities shall never be used directly. 12 * Warning: due to laziness of mapped objects, private attributes of all DB entities shall never be used directly.
...@@ -31,13 +31,13 @@ public class AccountRole /* extends org.roliste.data.DbEntity */ ...@@ -31,13 +31,13 @@ public class AccountRole /* extends org.roliste.data.DbEntity */
31 private String rolename; 31 private String rolename;
32 32
33 /** 33 /**
34 - * The {@link Account}s for this user role. 34 + * The {@link Account}s for this account role.
35 */ 35 */
36 @ManyToMany(mappedBy = "roles") 36 @ManyToMany(mappedBy = "roles")
37 private Set<Account> accounts; 37 private Set<Account> accounts;
38 38
39 /** 39 /**
40 - * Builds a new and empty user role definition. 40 + * Builds a new and empty account role definition.
41 * All attributes are set to their default value. 41 * All attributes are set to their default value.
42 * <br/> 42 * <br/>
43 * Needed by Hibernate for Java reflection. 43 * Needed by Hibernate for Java reflection.
...@@ -103,7 +103,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */ ...@@ -103,7 +103,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */
103 } 103 }
104 104
105 /** 105 /**
106 - * Initializes the user visible flag. 106 + * Initializes the account visible flag.
107 * @param visible the new flag value. 107 * @param visible the new flag value.
108 * @see #isVisible 108 * @see #isVisible
109 */ 109 */
...@@ -112,7 +112,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */ ...@@ -112,7 +112,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */
112 } 112 }
113 113
114 /** 114 /**
115 - * Retrieves the list of {@link Account}s for this user role. 115 + * Retrieves the list of {@link Account}s for this account role.
116 * SHALL be used as a read-only attribute. In particular, avoid 116 * SHALL be used as a read-only attribute. In particular, avoid
117 * using {@link Set#add(Object)} or {@link Set#remove(Object)} on 117 * using {@link Set#add(Object)} or {@link Set#remove(Object)} on
118 * the returned value without caution. 118 * the returned value without caution.
...@@ -137,7 +137,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */ ...@@ -137,7 +137,7 @@ public class AccountRole /* extends org.roliste.data.DbEntity */
137 } 137 }
138 138
139 /** 139 /**
140 - * Sets the list of {@link Account}s for this user role. 140 + * Sets the list of {@link Account}s for this account role.
141 * @param accounts the new {@link Set} of {@link Account}s. May be 141 * @param accounts the new {@link Set} of {@link Account}s. May be
142 * <code>null</code> (we don't handle the relation from this side). 142 * <code>null</code> (we don't handle the relation from this side).
143 * @see #getAccounts() 143 * @see #getAccounts()
...@@ -147,8 +147,8 @@ public class AccountRole /* extends org.roliste.data.DbEntity */ ...@@ -147,8 +147,8 @@ public class AccountRole /* extends org.roliste.data.DbEntity */
147 } 147 }
148 148
149 /** 149 /**
150 - * Returns a string representation of this user role definition. 150 + * Returns a string representation of this account role definition.
151 - * @return a string representing this user role definition. 151 + * @return a string representing this account role definition.
152 * hidden 152 * hidden
153 */ 153 */
154 @Override 154 @Override
......
1 -package org.legrog.web.user; 1 +package org.legrog.web.account;
2 2
3 import org.legrog.entities.Account; 3 import org.legrog.entities.Account;
4 4
5 import java.util.List; 5 import java.util.List;
6 6
7 -public interface UserService { 7 +public interface AccountService {
8 void addUser(Account account); 8 void addUser(Account account);
9 9
10 List<Account> getAllUsers(); 10 List<Account> getAllUsers();
......
1 -package org.legrog.web.user; 1 +package org.legrog.web.account;
2 2
3 import org.legrog.entities.Account; 3 import org.legrog.entities.Account;
4 import org.legrog.entities.AccountRepository; 4 import org.legrog.entities.AccountRepository;
...@@ -8,7 +8,7 @@ import javax.inject.Inject; ...@@ -8,7 +8,7 @@ import javax.inject.Inject;
8 import java.util.List; 8 import java.util.List;
9 9
10 @Stateless 10 @Stateless
11 -public class UserServiceDefault implements UserService { 11 +public class AccountServiceDefault implements AccountService {
12 @Inject 12 @Inject
13 AccountRepository accountRepository; 13 AccountRepository accountRepository;
14 14
......
1 -package org.legrog.web.user; 1 +package org.legrog.web.account;
2 2
3 import org.legrog.entities.Account; 3 import org.legrog.entities.Account;
4 4
...@@ -10,9 +10,9 @@ import java.util.List; ...@@ -10,9 +10,9 @@ import java.util.List;
10 10
11 @Named 11 @Named
12 @RequestScoped 12 @RequestScoped
13 -public class ListUsersBean { 13 +public class ListAccountsBean {
14 @Inject 14 @Inject
15 - private UserService userService; 15 + private AccountService userService;
16 16
17 private List<Account> accounts; 17 private List<Account> accounts;
18 18
......
1 -package org.legrog.web.user; 1 +package org.legrog.web.account;
2 2
3 import org.legrog.web.xyz.SharedService; 3 import org.legrog.web.xyz.SharedService;
4 import org.legrog.entities.*; 4 import org.legrog.entities.*;
...@@ -16,11 +16,11 @@ import java.util.List; ...@@ -16,11 +16,11 @@ import java.util.List;
16 16
17 @Named 17 @Named
18 @SessionScoped 18 @SessionScoped
19 -public class UpdateUserBean { 19 +public class UpdateAccountBean {
20 20
21 Logger logger = LoggerFactory.getLogger(getClass()); 21 Logger logger = LoggerFactory.getLogger(getClass());
22 22
23 - private UserService userService; 23 + private AccountService userService;
24 private SharedService sharedService; 24 private SharedService sharedService;
25 25
26 private List<DisplayNameMask> allDisplayNameMasks; 26 private List<DisplayNameMask> allDisplayNameMasks;
...@@ -45,12 +45,12 @@ public class UpdateUserBean { ...@@ -45,12 +45,12 @@ public class UpdateUserBean {
45 private boolean activated; 45 private boolean activated;
46 46
47 @Inject 47 @Inject
48 - public UpdateUserBean(UserService userService, SharedService sharedService) { 48 + public UpdateAccountBean(AccountService userService, SharedService sharedService) {
49 this.userService = userService; 49 this.userService = userService;
50 this.sharedService = sharedService; 50 this.sharedService = sharedService;
51 } 51 }
52 52
53 - UpdateUserBean() { 53 + UpdateAccountBean() {
54 //no args constructor to make it proxyable 54 //no args constructor to make it proxyable
55 } 55 }
56 56
...@@ -122,10 +122,10 @@ public class UpdateUserBean { ...@@ -122,10 +122,10 @@ public class UpdateUserBean {
122 } 122 }
123 username = account.getUsername(); 123 username = account.getUsername();
124 visible = account.isVisible(); 124 visible = account.isVisible();
125 - return "updateUser.xhtml"; 125 + return "updateAccount.xhtml";
126 } 126 }
127 } 127 }
128 - return "listUsers.xhtml"; 128 + return "listAccounts.xhtml";
129 } 129 }
130 130
131 public String update() { 131 public String update() {
...@@ -208,11 +208,11 @@ public class UpdateUserBean { ...@@ -208,11 +208,11 @@ public class UpdateUserBean {
208 this.activated = activated; 208 this.activated = activated;
209 } 209 }
210 210
211 - public UserService getUserService() { 211 + public AccountService getUserService() {
212 return userService; 212 return userService;
213 } 213 }
214 214
215 - public void setUserService(UserService userService) { 215 + public void setUserService(AccountService userService) {
216 this.userService = userService; 216 this.userService = userService;
217 } 217 }
218 218
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
13 13
14 <h:panelGrid columns="2"> 14 <h:panelGrid columns="2">
15 <h:outputText value="Username de l'utilisateur"/> 15 <h:outputText value="Username de l'utilisateur"/>
16 - <h:inputText value='#{updateUserBean.username}'/> 16 + <h:inputText value='#{updateAccountBean.username}'/>
17 <h:outputText value='Add'/> 17 <h:outputText value='Add'/>
18 - <h:commandButton action="#{updateUserBean.add}" value="Add"/> 18 + <h:commandButton action="#{updateAccountBean.add}" value="Add"/>
19 </h:panelGrid> 19 </h:panelGrid>
20 </h:form> 20 </h:form>
21 </body> 21 </body>
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
32 32
33 <div id="listElements"> 33 <div id="listElements">
34 34
35 - <h:commandLink styleClass="fRight acLink" action="add" rendered="#{not empty listUsersBean.accounts}" > 35 + <h:commandLink styleClass="fRight acLink" action="add" rendered="#{not empty listAccountsBean.accounts}" >
36 <img src="/images/structure/vide.gif" class="icAddC" alt="" title="Crer un nouvel utilisateur" /> 36 <img src="/images/structure/vide.gif" class="icAddC" alt="" title="Crer un nouvel utilisateur" />
37 Nouvel Utilisateur 37 Nouvel Utilisateur
38 </h:commandLink> 38 </h:commandLink>
39 39
40 - <p:dataTable id="tableElements" rendered="#{not empty listUsersBean.accounts}" 40 + <p:dataTable id="tableElements" rendered="#{not empty listAccountsBean.accounts}"
41 - var="account" value="#{listUsersBean.accounts}" 41 + var="account" value="#{listAccountsBean.accounts}"
42 styleClass="results" rowClasses="altRichRow,altRow"> 42 styleClass="results" rowClasses="altRichRow,altRow">
43 <!-- TODO Grer la pagination --> 43 <!-- TODO Grer la pagination -->
44 <!-- <p:dataTable id="tableElements" rendered="#{listUsersBean.accounts.size>0}" 44 <!-- <p:dataTable id="tableElements" rendered="#{listUsersBean.accounts.size>0}"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
61 </h:commandLink>--> 61 </h:commandLink>-->
62 </p:column> 62 </p:column>
63 <p:column> 63 <p:column>
64 - <h:commandLink action="#{updateUserBean.prepareUpdate(account.userId)}"> 64 + <h:commandLink action="#{updateAccountBean.prepareUpdate(account.userId)}">
65 <img src="/images/structure/vide.gif" class="icEdit" alt="Modifier" title="Modifier" /> 65 <img src="/images/structure/vide.gif" class="icEdit" alt="Modifier" title="Modifier" />
66 </h:commandLink> 66 </h:commandLink>
67 </p:column> 67 </p:column>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
99 </div> 99 </div>
100 <p> 100 <p>
101 <h:commandLink action="add" value="Crer un nouvel utilisateur" 101 <h:commandLink action="add" value="Crer un nouvel utilisateur"
102 - rendered="#{empty listUsersBean.accounts}"> 102 + rendered="#{empty listAccountsBean.accounts}">
103 </h:commandLink> 103 </h:commandLink>
104 </p> 104 </p>
105 </h:form> 105 </h:form>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 </h:commandLink> 12 </h:commandLink>
13 </h:form> 13 </h:form>
14 <ul> 14 <ul>
15 - <ui:repeat value="#{listUsersBean.accounts}" var="account"> 15 + <ui:repeat value="#{listAccountsBean.accounts}" var="account">
16 <li>#{account.username}</li> 16 <li>#{account.username}</li>
17 </ui:repeat> 17 </ui:repeat>
18 </ul> 18 </ul>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
18 <!-- content --> 18 <!-- content -->
19 <!-- <ui:define name="content">--> 19 <!-- <ui:define name="content">-->
20 <body> 20 <body>
21 - <h2><h:outputText value="Cration " rendered="#{updateUserBean.userId == 0}"/> 21 + <h2><h:outputText value="Cration " rendered="#{updateAccountBean.userId == 0}"/>
22 - <h:outputText value="Modification " rendered="#{updateUserBean.userId != 0}"/>d'un utilisateur</h2> 22 + <h:outputText value="Modification " rendered="#{updateAccountBean.userId != 0}"/>d'un utilisateur</h2>
23 23
24 <p> 24 <p>
25 Les rles sont hirarchiss, et la hirarchie est automatiquement applique lorsque vous 25 Les rles sont hirarchiss, et la hirarchie est automatiquement applique lorsque vous
...@@ -40,53 +40,53 @@ ...@@ -40,53 +40,53 @@
40 <table class="noMargin"> 40 <table class="noMargin">
41 <tr> 41 <tr>
42 <td><h:outputLabel for="username">Identifiant *</h:outputLabel></td> 42 <td><h:outputLabel for="username">Identifiant *</h:outputLabel></td>
43 - <td><h:inputText id="username" value="#{updateUserBean.username}" required="true" style="width: 175px;" maxlength="50"/></td> 43 + <td><h:inputText id="username" value="#{updateAccountBean.username}" required="true" style="width: 175px;" maxlength="50"/></td>
44 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="username"/></td> 44 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="username"/></td>
45 </tr> 45 </tr>
46 <tr> 46 <tr>
47 <td><h:outputLabel for="firstname">Prnom *</h:outputLabel></td> 47 <td><h:outputLabel for="firstname">Prnom *</h:outputLabel></td>
48 - <td><h:inputText id="firstname" value="#{updateUserBean.firstName}" required="true" style="width: 175px;" maxlength="50"/></td> 48 + <td><h:inputText id="firstname" value="#{updateAccountBean.firstName}" required="true" style="width: 175px;" maxlength="50"/></td>
49 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="firstname"/></td> 49 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="firstname"/></td>
50 </tr> 50 </tr>
51 <tr> 51 <tr>
52 <td><h:outputLabel for="lastname">Nom *</h:outputLabel></td> 52 <td><h:outputLabel for="lastname">Nom *</h:outputLabel></td>
53 - <td><h:inputText id="lastname" value="#{updateUserBean.lastName}" required="true" style="width: 175px;" maxlength="50"/></td> 53 + <td><h:inputText id="lastname" value="#{updateAccountBean.lastName}" required="true" style="width: 175px;" maxlength="50"/></td>
54 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="lastname"/></td> 54 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="lastname"/></td>
55 </tr> 55 </tr>
56 <tr> 56 <tr>
57 <td><h:outputLabel for="nickname">Pseudonyme</h:outputLabel></td> 57 <td><h:outputLabel for="nickname">Pseudonyme</h:outputLabel></td>
58 - <td><h:inputText id="nickname" value="#{updateUserBean.nickName}" style="width: 175px;" maxlength="50"/></td> 58 + <td><h:inputText id="nickname" value="#{updateAccountBean.nickName}" style="width: 175px;" maxlength="50"/></td>
59 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="nickname"/></td> 59 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="nickname"/></td>
60 </tr> 60 </tr>
61 <tr> 61 <tr>
62 <td><h:outputLabel for="mask">Affichage public du nom *</h:outputLabel></td> 62 <td><h:outputLabel for="mask">Affichage public du nom *</h:outputLabel></td>
63 <td> 63 <td>
64 - <h:selectOneMenu id="mask" value="#{updateUserBean.displayNameMask}" converter="omnifaces.SelectItemsConverter" required="true" style="width: 175px;"> 64 + <h:selectOneMenu id="mask" value="#{updateAccountBean.displayNameMask}" converter="omnifaces.SelectItemsConverter" required="true" style="width: 175px;">
65 - <f:selectItems value="#{updateUserBean.allDisplayNameMasks}"/> 65 + <f:selectItems value="#{updateAccountBean.allDisplayNameMasks}"/>
66 </h:selectOneMenu> 66 </h:selectOneMenu>
67 </td> 67 </td>
68 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="mask"/></td> 68 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="mask"/></td>
69 </tr> 69 </tr>
70 <tr> 70 <tr>
71 <td><h:outputLabel for="email">Adresse email *</h:outputLabel></td> 71 <td><h:outputLabel for="email">Adresse email *</h:outputLabel></td>
72 - <td><h:inputText id="email" value="#{updateUserBean.email}" required="true" style="width: 175px;" maxlength="100"><!--<f:validator validatorId="validateEmail"/>--></h:inputText></td> 72 + <td><h:inputText id="email" value="#{updateAccountBean.email}" required="true" style="width: 175px;" maxlength="100"><!--<f:validator validatorId="validateEmail"/>--></h:inputText></td>
73 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="email"/></td> 73 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="email"/></td>
74 </tr> 74 </tr>
75 <tr> 75 <tr>
76 <td><h:outputLabel for="anonymous">Profil Anonyme ?</h:outputLabel></td> 76 <td><h:outputLabel for="anonymous">Profil Anonyme ?</h:outputLabel></td>
77 - <td><h:selectBooleanCheckbox id="anonymous" value="#{updateUserBean.anonymous}"/></td> 77 + <td><h:selectBooleanCheckbox id="anonymous" value="#{updateAccountBean.anonymous}"/></td>
78 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="anonymous"/></td> 78 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="anonymous"/></td>
79 </tr> 79 </tr>
80 <tr> 80 <tr>
81 <td><h:outputLabel for="password">Mot de passe *</h:outputLabel></td> 81 <td><h:outputLabel for="password">Mot de passe *</h:outputLabel></td>
82 - <td><h:inputSecret id="password" redisplay="true" value="#{updateUserBean.password}" required="true" style="width: 175px;" maxlength="50"/></td> 82 + <td><h:inputSecret id="password" redisplay="true" value="#{updateAccountBean.password}" required="true" style="width: 175px;" maxlength="50"/></td>
83 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="password"/></td> 83 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="password"/></td>
84 </tr> 84 </tr>
85 <tr> 85 <tr>
86 <td><h:outputLabel for="roles">Rles</h:outputLabel></td> 86 <td><h:outputLabel for="roles">Rles</h:outputLabel></td>
87 <td> 87 <td>
88 - <h:selectManyCheckbox id="roles" value="#{updateUserBean.roles}" converter="omnifaces.SelectItemsConverter" layout="pageDirection" > 88 + <h:selectManyCheckbox id="roles" value="#{updateAccountBean.roles}" converter="omnifaces.SelectItemsConverter" layout="pageDirection" >
89 - <f:selectItems value="#{updateUserBean.availableAccountRoles}" var="role" itemLabel="#{role.rolename}" /> 89 + <f:selectItems value="#{updateAccountBean.availableAccountRoles}" var="role" itemLabel="#{role.rolename}" />
90 </h:selectManyCheckbox> 90 </h:selectManyCheckbox>
91 </td> 91 </td>
92 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="roles"/></td> 92 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="roles"/></td>
...@@ -100,17 +100,17 @@ ...@@ -100,17 +100,17 @@
100 <td colspan="2"><!--<rich:editor id="text" value="#{updateUserBean.presentation}" configuration="article-editor"/>--></td> 100 <td colspan="2"><!--<rich:editor id="text" value="#{updateUserBean.presentation}" configuration="article-editor"/>--></td>
101 </tr> 101 </tr>
102 <ui:remove> 102 <ui:remove>
103 - <ui:fragment rendered="#{updateUserBean.userId != 0}"> 103 + <ui:fragment rendered="#{updateAccountBean.userId != 0}">
104 <tr> 104 <tr>
105 <td colspan="3" class="taCenter"> 105 <td colspan="3" class="taCenter">
106 <h:dataTable style="width:75%" headerClass="colDroite" 106 <h:dataTable style="width:75%" headerClass="colDroite"
107 - var="userProperty" value="#{updateUserBean.availableUserProperties}"> 107 + var="userProperty" value="#{updateAccountBean.availableUserProperties}">
108 <h:column> 108 <h:column>
109 <f:facet name="header"><h:outputLabel>Proprits</h:outputLabel></f:facet> 109 <f:facet name="header"><h:outputLabel>Proprits</h:outputLabel></f:facet>
110 <h:outputText value="#{userProperty.tag}"/> 110 <h:outputText value="#{userProperty.tag}"/>
111 </h:column> 111 </h:column>
112 <h:column> 112 <h:column>
113 - <h:inputText id="prop_#{userProperty.name}" value="#{updateUserBean.accountAttributes[userProperty.name].value}" style="width: 175px;"> 113 + <h:inputText id="prop_#{userProperty.name}" value="#{updateAccountBean.accountAttributes[userProperty.name].value}" style="width: 175px;">
114 <f:validateLength maximum="200"/> 114 <f:validateLength maximum="200"/>
115 </h:inputText> 115 </h:inputText>
116 </h:column> 116 </h:column>
...@@ -121,24 +121,24 @@ ...@@ -121,24 +121,24 @@
121 </ui:remove> 121 </ui:remove>
122 <tr> 122 <tr>
123 <td><h:outputLabel for="criticProvider">Archives de critiques ?</h:outputLabel></td> 123 <td><h:outputLabel for="criticProvider">Archives de critiques ?</h:outputLabel></td>
124 - <td><h:selectBooleanCheckbox id="criticProvider" value="#{updateUserBean.criticProvider}"/></td> 124 + <td><h:selectBooleanCheckbox id="criticProvider" value="#{updateAccountBean.criticProvider}"/></td>
125 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="criticProvider"/></td> 125 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="criticProvider"/></td>
126 </tr> 126 </tr>
127 <tr> 127 <tr>
128 <td><h:outputLabel for="visible">Visible ?</h:outputLabel></td> 128 <td><h:outputLabel for="visible">Visible ?</h:outputLabel></td>
129 - <td><h:selectBooleanCheckbox id="visible" value="#{updateUserBean.visible}"/></td> 129 + <td><h:selectBooleanCheckbox id="visible" value="#{updateAccountBean.visible}"/></td>
130 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="visible"/></td> 130 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="visible"/></td>
131 </tr> 131 </tr>
132 <tr> 132 <tr>
133 <td><h:outputLabel for="activated">Activ ?</h:outputLabel></td> 133 <td><h:outputLabel for="activated">Activ ?</h:outputLabel></td>
134 - <td><h:selectBooleanCheckbox id="activated" value="#{updateUserBean.activated}"/></td> 134 + <td><h:selectBooleanCheckbox id="activated" value="#{updateAccountBean.activated}"/></td>
135 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="activated"/></td> 135 <td><h:message errorClass="errorMsg" infoClass="infoMsg" for="activated"/></td>
136 </tr> 136 </tr>
137 <tr> 137 <tr>
138 <td colspan="3" class="taCenter"> 138 <td colspan="3" class="taCenter">
139 <!-- <h:outputText>"</h:outputText>#{updateUserBean.userId}<h:outputText>"</h:outputText>--> 139 <!-- <h:outputText>"</h:outputText>#{updateUserBean.userId}<h:outputText>"</h:outputText>-->
140 - <h:commandButton id="update" value="Enregistrer" action="#{updateUserBean.update}" rendered="#{updateUserBean.userId != 0}"/>&#160; 140 + <h:commandButton id="update" value="Enregistrer" action="#{updateAccountBean.update}" rendered="#{updateAccountBean.userId != 0}"/>&#160;
141 - <h:commandButton id="add" value="Crer" action="#{updateUserBean.add}" rendered="#{updateUserBean.userId == 0}"/>&#160; 141 + <h:commandButton id="add" value="Crer" action="#{updateAccountBean.add}" rendered="#{updateAccountBean.userId == 0}"/>&#160;
142 <h:button id="cancel" value="Annuler" outcome="cancel"/> 142 <h:button id="cancel" value="Annuler" outcome="cancel"/>
143 </td> 143 </td>
144 </tr> 144 </tr>
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
147 </p:panel> 147 </p:panel>
148 <ui:remove> 148 <ui:remove>
149 <p:panel headerClass="colDroite" bodyClass="colTexte" label="Import d'anciennes donnes" 149 <p:panel headerClass="colDroite" bodyClass="colTexte" label="Import d'anciennes donnes"
150 - switchType="ajax" opened="true" rendered="#{updateUserBean.userId != 0}"> 150 + switchType="ajax" opened="true" rendered="#{updateAccountBean.userId != 0}">
151 <h:form> 151 <h:form>
152 <!--<s:validateAll>--> 152 <!--<s:validateAll>-->
153 <p> 153 <p>
......
1 package org.legrog.web.xyz; 1 package org.legrog.web.xyz;
2 2
3 import org.legrog.entities.*; 3 import org.legrog.entities.*;
4 -import org.legrog.web.user.UserService; 4 +import org.legrog.web.account.AccountService;
5 5
6 import javax.ejb.Stateless; 6 import javax.ejb.Stateless;
7 import javax.inject.Inject; 7 import javax.inject.Inject;
...@@ -18,7 +18,7 @@ public class SharedServiceDefault implements SharedService { ...@@ -18,7 +18,7 @@ public class SharedServiceDefault implements SharedService {
18 CountryRepository countryRepository; 18 CountryRepository countryRepository;
19 AccountRoleRepository accountRoleRepository; 19 AccountRoleRepository accountRoleRepository;
20 AccountPropertyRepository accountPropertyRepository; 20 AccountPropertyRepository accountPropertyRepository;
21 - UserService userService; 21 + AccountService accountService;
22 22
23 private List<DisplayNameMask> allDisplayNameMasks; 23 private List<DisplayNameMask> allDisplayNameMasks;
24 24
...@@ -28,15 +28,15 @@ public class SharedServiceDefault implements SharedService { ...@@ -28,15 +28,15 @@ public class SharedServiceDefault implements SharedService {
28 * @param countryRepository 28 * @param countryRepository
29 * @param accountRoleRepository 29 * @param accountRoleRepository
30 * @param accountPropertyRepository 30 * @param accountPropertyRepository
31 - * @param userService 31 + * @param accountService
32 */ 32 */
33 @Inject 33 @Inject
34 public SharedServiceDefault(CountryRepository countryRepository, AccountRoleRepository accountRoleRepository, 34 public SharedServiceDefault(CountryRepository countryRepository, AccountRoleRepository accountRoleRepository,
35 - AccountPropertyRepository accountPropertyRepository, UserService userService) { 35 + AccountPropertyRepository accountPropertyRepository, AccountService accountService) {
36 this.countryRepository = countryRepository; 36 this.countryRepository = countryRepository;
37 this.accountRoleRepository = accountRoleRepository; 37 this.accountRoleRepository = accountRoleRepository;
38 this.accountPropertyRepository = accountPropertyRepository; 38 this.accountPropertyRepository = accountPropertyRepository;
39 - this.userService = userService; 39 + this.accountService = accountService;
40 } 40 }
41 41
42 @Override 42 @Override
...@@ -75,7 +75,7 @@ public class SharedServiceDefault implements SharedService { ...@@ -75,7 +75,7 @@ public class SharedServiceDefault implements SharedService {
75 @Override 75 @Override
76 public Account getCurrentUser() { 76 public Account getCurrentUser() {
77 // TODO Remplacer l'astuce par une vraie récupération de l'utilisateur 77 // TODO Remplacer l'astuce par une vraie récupération de l'utilisateur
78 - List<Account> accounts = userService.getAllUsers(); 78 + List<Account> accounts = accountService.getAllUsers();
79 Random random = new Random(); 79 Random random = new Random();
80 80
81 return accounts.get(random.nextInt(accounts.size())); 81 return accounts.get(random.nextInt(accounts.size()));
......
1 -package org.legrog.web.user; 1 +package org.legrog.web.account;
2 2
3 import org.junit.jupiter.api.BeforeEach; 3 import org.junit.jupiter.api.BeforeEach;
4 import org.junit.jupiter.api.DisplayName; 4 import org.junit.jupiter.api.DisplayName;
...@@ -27,11 +27,11 @@ import static org.mockito.Mockito.when; ...@@ -27,11 +27,11 @@ import static org.mockito.Mockito.when;
27 @RunWith(JUnitPlatform.class) 27 @RunWith(JUnitPlatform.class)
28 public class UpdateAccountBeanTest { 28 public class UpdateAccountBeanTest {
29 29
30 - UpdateUserBean updateUserBean; 30 + UpdateAccountBean updateUserBean;
31 31
32 @BeforeEach 32 @BeforeEach
33 - public void setUp(@Mock UserService userService, @Mock SharedService sharedService) throws Exception { 33 + public void setUp(@Mock AccountService userService, @Mock SharedService sharedService) throws Exception {
34 - updateUserBean = new UpdateUserBean(userService, sharedService) ; 34 + updateUserBean = new UpdateAccountBean(userService, sharedService) ;
35 } 35 }
36 36
37 @Test 37 @Test
...@@ -56,7 +56,7 @@ public class UpdateAccountBeanTest { ...@@ -56,7 +56,7 @@ public class UpdateAccountBeanTest {
56 } 56 }
57 57
58 @Test 58 @Test
59 - @DisplayName("should set lists of available masks, user roles, and user properties from shared service") 59 + @DisplayName("should set lists of available masks, account roles, and account properties from shared service")
60 public void testList(@Mock SharedService sharedService) { 60 public void testList(@Mock SharedService sharedService) {
61 updateUserBean.init(); 61 updateUserBean.init();
62 assertThat(updateUserBean.getAllDisplayNameMasks()).isEqualTo(displayNameMasks); 62 assertThat(updateUserBean.getAllDisplayNameMasks()).isEqualTo(displayNameMasks);
......
...@@ -252,7 +252,7 @@ public class PublisherVersionViewTest { ...@@ -252,7 +252,7 @@ public class PublisherVersionViewTest {
252 } 252 }
253 253
254 @Test 254 @Test
255 - @DisplayName("should set lists of available masks, user roles, and user properties from shared service") 255 + @DisplayName("should set lists of available masks, account roles, and account properties from shared service")
256 public void testList(@Mock SharedService sharedService) { 256 public void testList(@Mock SharedService sharedService) {
257 publisherVersionView.init(); 257 publisherVersionView.init();
258 assertThat(publisherVersionView.getAvailableCountries()).isEqualTo(countries); 258 assertThat(publisherVersionView.getAvailableCountries()).isEqualTo(countries);
......
...@@ -12,7 +12,7 @@ import org.legrog.entities.AccountRoleRepository; ...@@ -12,7 +12,7 @@ import org.legrog.entities.AccountRoleRepository;
12 import org.legrog.entities.Country; 12 import org.legrog.entities.Country;
13 import org.legrog.entities.CountryRepository; 13 import org.legrog.entities.CountryRepository;
14 import org.legrog.test.MockitoExtension; 14 import org.legrog.test.MockitoExtension;
15 -import org.legrog.web.user.UserService; 15 +import org.legrog.web.account.AccountService;
16 import org.mockito.Mock; 16 import org.mockito.Mock;
17 import org.mockito.*; 17 import org.mockito.*;
18 18
...@@ -31,9 +31,9 @@ public class SharedServiceDefaultTest { ...@@ -31,9 +31,9 @@ public class SharedServiceDefaultTest {
31 public void setUp(@Mock CountryRepository countryRepository, 31 public void setUp(@Mock CountryRepository countryRepository,
32 @Mock AccountRoleRepository accountRoleRepository, 32 @Mock AccountRoleRepository accountRoleRepository,
33 @Mock AccountPropertyRepository accountPropertyRepository, 33 @Mock AccountPropertyRepository accountPropertyRepository,
34 - @Mock UserService userService) { 34 + @Mock AccountService accountService) {
35 sharedServiceDefault = new SharedServiceDefault(countryRepository, accountRoleRepository, 35 sharedServiceDefault = new SharedServiceDefault(countryRepository, accountRoleRepository,
36 - accountPropertyRepository, userService); 36 + accountPropertyRepository, accountService);
37 } 37 }
38 38
39 @Nested 39 @Nested
......