]> git.mxchange.org Git - pizzaservice-ejb.git/blob - src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java
Please cherry-pick:
[pizzaservice-ejb.git] / src / java / org / mxchange / jusercore / model / user / PizzaUserSessionBean.java
1 /*
2  * Copyright (C) 2016 - 2020 Free Software Foundation
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License as
6  * published by the Free Software Foundation, either version 3 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Affero General Public License for more details.
13  *
14  * You should have received a copy of the GNU Affero General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jusercore.model.user;
18
19 import java.text.MessageFormat;
20 import java.util.Date;
21 import java.util.List;
22 import java.util.Objects;
23 import javax.ejb.EJB;
24 import javax.ejb.EJBException;
25 import javax.ejb.Stateless;
26 import javax.persistence.Query;
27 import org.mxchange.jcontacts.model.contact.Contact;
28 import org.mxchange.jcontacts.model.contact.Contacts;
29 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
30 import org.mxchange.jphone.model.phonenumbers.fax.FaxNumbers;
31 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
32 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumbers;
33 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
34 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumbers;
35 import org.mxchange.jusercore.exceptions.UserNotFoundException;
36 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
37 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
38 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
39 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
40 import org.mxchange.jusercore.model.user.password_history.UserPasswordHistory;
41 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
42 import org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote;
43 import org.mxchange.pizzaaplication.enterprise.BasePizzaEnterpriseBean;
44
45 /**
46  * A user EJB
47  * <p>
48  * @author Roland Häder<roland@mxchange.org>
49  */
50 @Stateless (name = "user", description = "A bean handling the user data")
51 public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements UserSessionBeanRemote {
52
53         /**
54          * Serial number
55          */
56         private static final long serialVersionUID = 542_145_347_916L;
57
58         /**
59          * Registration EJB
60          */
61         @EJB (lookup = "java:global/pizzaservice-ejb/userRegistration!org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote")
62         private UserRegistrationSessionBeanRemote registerBean;
63
64         /**
65          * Default constructor
66          */
67         public PizzaUserSessionBean () {
68                 // Call super constructor
69                 super("jms/pizzaservice-queue-factory", "jms/pizzaservice-email-queue"); //NOI18N
70         }
71
72         @Override
73         public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException {
74                 // Trace message
75                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
76
77                 // Parameter must be valid
78                 if (null == user) {
79                         // Abort here
80                         throw new NullPointerException("user is null"); //NOI18N
81                 } else if (user.getUserId() == null) {
82                         // Abort here
83                         throw new NullPointerException("user.userId is null"); //NOI18N
84                 } else if (user.getUserId() < 1) {
85                         // Invalid number
86                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
87                 } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
88                         // Account is already confirmed
89                         throw new UserStatusConfirmedException(user);
90                 } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
91                         // Account is already confirmed
92                         throw new UserStatusLockedException(user);
93                 } else if (user.getUserConfirmKey() == null) {
94                         // Throw NPE
95                         throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
96                 } else if (null == baseUrl) {
97                         // Throw it again
98                         throw new NullPointerException("baseUrl is null"); //NOI18N
99                 } else if (baseUrl.isEmpty()) {
100                         // Invalid parameter
101                         throw new IllegalArgumentException("baseUrl is empty"); //NOI18N
102                 }
103
104                 // Update user account
105                 final User managedUser = this.updateUserData(user);
106
107                 // Update user status and remove confirmation key
108                 managedUser.setUserAccountStatus(UserAccountStatus.CONFIRMED);
109                 managedUser.setUserConfirmKey(null);
110                 managedUser.setUserUpdated(new Date());
111
112                 // Send out email
113                 this.sendEmail("User account confirmed", "user_account_confirmed", managedUser, baseUrl, null); //NOI18N
114
115                 // Trace message
116                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
117
118                 // Return updated instance
119                 return managedUser;
120         }
121
122         @Override
123         @SuppressWarnings ("unchecked")
124         public List<User> fetchAllUsers () {
125                 // Trace message
126                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
127
128                 // Get named query
129                 final Query query = this.getEntityManager().createNamedQuery("AllUsers", LoginUser.class); //NOI18N
130
131                 // Get result
132                 final List<User> users = query.getResultList();
133
134                 // Trace message
135                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
136
137                 // Return full list
138                 return users;
139         }
140
141         @Override
142         public boolean ifUserExists (final User user) {
143                 // Trace message
144                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
145
146                 // userId should not be null
147                 if (null == user) {
148                         // Abort here
149                         throw new NullPointerException("user is null"); //NOI18N
150                 } else if (user.getUserId() == null) {
151                         // Abort here
152                         throw new NullPointerException("user.userId is null"); //NOI18N
153                 } else if (user.getUserId() < 1) {
154                         // Invalid number
155                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
156                 }
157
158                 // Default is not found
159                 boolean isFound = false;
160
161                 // Fetch whole list
162                 for (final User currentUser : this.fetchAllUsers()) {
163                         // Is found?
164                         if (Objects.equals(user, currentUser)) {
165                                 // Yes, then set flag and exit iteration
166                                 isFound = true;
167                                 break;
168                         }
169                 }
170
171                 // Trace message
172                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: isFound={1} - EXIT!", this.getClass().getSimpleName(), isFound)); //NOI18N
173
174                 // Return flag
175                 return isFound;
176         }
177
178         @Override
179         public boolean ifUserNameExists (final String userName) {
180                 // Trace message
181                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: userName={1} - CALLED!", this.getClass().getSimpleName(), userName)); //NOI18N
182
183                 // userId should not be null
184                 if (null == userName) {
185                         // Abort here
186                         throw new NullPointerException("userName is null"); //NOI18N
187                 } else if (userName.isEmpty()) {
188                         // Abort here
189                         throw new NullPointerException("userName is empty"); //NOI18N
190                 }
191
192                 // Default is not registered
193                 boolean isRegistered = false;
194
195                 // Iterate over all records
196                 for (final User currentUser : this.fetchAllUsers()) {
197                         // Does the username match?
198                         if (userName.equals(currentUser.getUserName())) {
199                                 // Yes, then set flag and exit iteration
200                                 isRegistered = true;
201                                 break;
202                         }
203                 }
204
205                 // Trace message
206                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: isRegistered={1} - EXIT!", this.getClass().getSimpleName(), isRegistered)); //NOI18N
207
208                 // Found it
209                 return true;
210         }
211
212         @Override
213         public boolean isEmailAddressRegistered (final User user) {
214                 // Trace message
215                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
216
217                 // user should not be null
218                 if (null == user) {
219                         // Abort here
220                         throw new NullPointerException("user is null"); //NOI18N
221                 }
222
223                 // Default is not registered
224                 boolean isRegistered = false;
225
226                 // Iterate over all records
227                 for (final User currentUser : this.fetchAllUsers()) {
228                         // Does the email address match?
229                         if (user.getUserContact().getContactEmailAddress().equals(currentUser.getUserContact().getContactEmailAddress())) {
230                                 // Yes, then set flag and exit iteration
231                                 isRegistered = true;
232                                 break;
233                         }
234                 }
235
236                 // Trace message
237                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: isRegistered={1} - EXIT!", this.getClass().getSimpleName(), isRegistered)); //NOI18N
238
239                 // Found it
240                 return isRegistered;
241         }
242
243         @Override
244         public boolean isUserNameRegistered (final User user) {
245                 // Trace message
246                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
247
248                 // user should not be null
249                 if (null == user) {
250                         // Abort here
251                         throw new NullPointerException("user is null"); //NOI18N
252                 }
253
254                 // Ask other method
255                 final boolean isRegistered = this.ifUserNameExists(user.getUserName());
256
257                 // Trace message
258                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: isRegistered={1} - EXIT!", this.getClass().getSimpleName(), isRegistered)); //NOI18N
259
260                 // Return flag
261                 return isRegistered;
262         }
263
264         @Override
265         public User updateUserData (final User detachedUser) {
266                 // Trace message
267                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: detachedUser={1} - CALLED!", this.getClass().getSimpleName(), detachedUser)); //NOI18N
268
269                 // user should not be null
270                 if (null == detachedUser) {
271                         // Abort here
272                         throw new NullPointerException("detachedUser is null"); //NOI18N
273                 } else if (detachedUser.getUserId() == null) {
274                         // Throw NPE again
275                         throw new NullPointerException("detachedUser.userId is null"); //NOI18N
276                 } else if (detachedUser.getUserId() < 1) {
277                         // Not valid
278                         throw new IllegalArgumentException(MessageFormat.format("detachedUser.userId={0} is not valid", detachedUser.getUserId())); //NOI18N
279                 } else if (detachedUser.getUserAccountStatus() == null) {
280                         // Throw NPE again
281                         throw new NullPointerException("detachedUser.userAccountStatus is null"); //NOI18N
282                 } else if (!this.ifUserExists(detachedUser)) {
283                         // User does not exist
284                         throw new EJBException(MessageFormat.format("User with id {0} does not exist.", detachedUser.getUserId())); //NOI18N
285                 }
286
287                 // Find the instance
288                 final User foundUser = this.getEntityManager().find(detachedUser.getClass(), detachedUser.getUserId());
289
290                 // Should be found!
291                 assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", detachedUser.getUserId()); //NOI18N
292
293                 // Merge user
294                 final User managedUser = this.getEntityManager().merge(foundUser);
295
296                 // Should be found!
297                 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", managedUser.getUserId()); //NOI18N
298
299                 // Copy all data
300                 Users.copyAll(detachedUser, managedUser);
301
302                 // Set as updated
303                 managedUser.setUserUpdated(new Date());
304
305                 // Trace message
306                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
307
308                 // Return updated instance
309                 return managedUser;
310         }
311
312         @Override
313         public PasswordHistory updateUserPassword (final User user, final String baseUrl) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException {
314                 // Trace message
315                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
316
317                 // user should not be null
318                 if (null == user) {
319                         // Throw NPE
320                         throw new NullPointerException("user is null"); //NOI18N
321                 } else if (user.getUserId() == null) {
322                         // Throw NPE again
323                         throw new NullPointerException("user.userId is null"); //NOI18N
324                 } else if (user.getUserId() < 1) {
325                         // Not valid number
326                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N
327                 } else if (user.getUserName() == null) {
328                         // Throw NPE again
329                         throw new NullPointerException("user.userName is null"); //NOI18N
330                 } else if (user.getUserName().isEmpty()) {
331                         // Empty string
332                         throw new IllegalArgumentException("user.userName is empty"); //NOI18N
333                 } else if (user.getUserAccountStatus() == null) {
334                         // Throw NPE
335                         throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
336                 } else if (user.getUserContact() == null) {
337                         // Throw it again
338                         throw new NullPointerException("user.userContact is null"); //NOI18N
339                 } else if (user.getUserContact().getContactId() == null) {
340                         // .. and again
341                         throw new NullPointerException("user.userContact.contactId is null"); //NOI18N
342                 } else if (user.getUserContact().getContactId() < 1) {
343                         // Invalid id
344                         throw new IllegalArgumentException(MessageFormat.format("user.userContact.contactId={0} is invalid", user.getUserContact().getContactId())); //NOI18N
345                 } else if (user.getUserContact().getContactPersonalTitle() == null) {
346                         // Throw NPE again
347                         throw new NullPointerException("user.userContact.contactPersonalTitle is null"); //NOI18N
348                 } else if (!this.ifUserExists(user)) {
349                         // User does not exist
350                         throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
351                 } else if (null == baseUrl) {
352                         // Throw it again
353                         throw new NullPointerException("baseUrl is null"); //NOI18N
354                 } else if (baseUrl.isEmpty()) {
355                         // Invalid parameter
356                         throw new IllegalArgumentException("baseUrl is empty"); //NOI18N
357                 }
358
359                 // Call other method
360                 final User managedUser = this.updateUserData(user);
361
362                 // Update user account
363                 managedUser.setUserUpdated(new Date());
364
365                 // Create history entry
366                 PasswordHistory entry = new UserPasswordHistory(user.getUserEncryptedPassword(), managedUser);
367
368                 // Set created timestamp
369                 entry.setUserPasswordHistoryCreated(new Date());
370
371                 // Merge user to make sure it is not re-persisted
372                 final User mergedUser = this.getEntityManager().merge(managedUser);
373                 entry.setUserPasswordHistoryUser(mergedUser);
374
375                 // Persist it
376                 this.getEntityManager().persist(entry);
377
378                 // Send email to user
379                 this.sendEmail("User password change", "user_password_change", managedUser, baseUrl, null); //NOI18N
380
381                 // Trace message
382                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N
383
384                 // Return it
385                 return entry;
386         }
387
388         @Override
389         public User updateUserPersonalData (final User user) {
390                 // Trace message
391                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
392
393                 // user should not be null
394                 if (null == user) {
395                         // Abort here
396                         throw new NullPointerException("user is null"); //NOI18N
397                 } else if (user.getUserId() == null) {
398                         // Throw NPE again
399                         throw new NullPointerException("user.userId is null"); //NOI18N
400                 } else if (user.getUserId() < 1) {
401                         // Not valid
402                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
403                 } else if (user.getUserAccountStatus() == null) {
404                         // Throw NPE again
405                         throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
406                 } else if (!this.ifUserExists(user)) {
407                         // User does not exist
408                         throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
409                 }
410
411                 // Find the instance
412                 final User managedUser = this.getEntityManager().find(user.getClass(), user.getUserId());
413
414                 // Should be found!
415                 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
416
417                 // Copy all data
418                 Users.copyAll(user, managedUser);
419
420                 // Set as updated
421                 managedUser.setUserUpdated(new Date());
422                 managedUser.getUserContact().setContactUpdated(new Date());
423
424                 // Get contact from it and find it
425                 final Contact foundContact = this.getEntityManager().find(managedUser.getUserContact().getClass(), managedUser.getUserContact().getContactId());
426
427                 // Should be found
428                 assert (foundContact instanceof Contact) : MessageFormat.format("Contact with id {0} not found, but should be.", user.getUserContact().getContactId()); //NOI18N
429
430                 // Debug message
431                 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: contact.contactId={0}", foundContact.getContactId())); //NOI18N
432
433                 // Merge contact instance
434                 final Contact managedContact = this.getEntityManager().merge(foundContact);
435
436                 // Copy all
437                 Contacts.copyAll(managedUser.getUserContact(), managedContact);
438
439                 // Set it back in user
440                 user.setUserContact(managedContact);
441
442                 // Should be found!
443                 assert (managedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not merged, but should be.", user.getUserContact().getContactId()); //NOI18N
444
445                 // Get mobile instance
446                 final DialableMobileNumber mobileNumber = managedContact.getContactMobileNumber();
447
448                 // Is there a  mobile instance set?
449                 if (mobileNumber instanceof DialableMobileNumber) {
450                         // Debug message
451                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getMobileId())); //NOI18N
452
453                         // Then find it, too
454                         final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getMobileId());
455
456                         // Should be there
457                         assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N
458
459                         // Copy all
460                         MobileNumbers.copyMobileNumber(managedUser.getUserContact().getContactMobileNumber(), foundMobile);
461
462                         // Then merge it, too
463                         final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile);
464
465                         // Should be there
466                         assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getMobileId()); //NOI18N
467
468                         // Copy all
469                         MobileNumbers.copyAll(managedUser.getUserContact().getContactMobileNumber(), managedMobile);
470
471                         // Set it back
472                         managedContact.setContactMobileNumber(this.createManaged(mobileNumber, mobileNumber));
473                 }
474
475                 // Get mobile instance
476                 final DialableFaxNumber faxNumber = managedContact.getContactFaxNumber();
477
478                 // Is there a  fax instance set?
479                 if (faxNumber instanceof DialableFaxNumber) {
480                         // Debug message
481                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: faxNumber.phoneId={0} is being updated ...", faxNumber.getPhoneId())); //NOI18N
482
483                         // Then find it, too
484                         final DialableFaxNumber foundFax = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId());
485
486                         // Should be there
487                         assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N
488
489                         // Copy all
490                         FaxNumbers.copyFaxNumber(managedUser.getUserContact().getContactFaxNumber(), foundFax);
491
492                         // Then merge it, too
493                         final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax);
494
495                         // Should be there
496                         assert (managedFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", managedFax.getPhoneId()); //NOI18N
497
498                         // Copy all
499                         FaxNumbers.copyAll(managedUser.getUserContact().getContactFaxNumber(), managedFax);
500
501                         // Set it back
502                         managedContact.setContactFaxNumber(managedFax);
503                 }
504
505                 // Get mobile instance
506                 final DialableLandLineNumber landLineNumber = managedContact.getContactLandLineNumber();
507
508                 // Is there a  fax instance set?
509                 if (landLineNumber instanceof DialableLandLineNumber) {
510                         // Debug message
511                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLineNumber.phoneId={0} is being updated ...", landLineNumber.getPhoneId())); //NOI18N
512
513                         // Then find it, too
514                         final DialableLandLineNumber foundLandLine = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId());
515
516                         // Should be there
517                         assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N
518
519                         // Copy all
520                         LandLineNumbers.copyLandLineNumber(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine);
521
522                         // Then merge it, too
523                         final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine);
524
525                         // Should be there
526                         assert (managedLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", managedLandLine.getPhoneId()); //NOI18N
527
528                         // Copy all
529                         LandLineNumbers.copyAll(managedUser.getUserContact().getContactLandLineNumber(), managedLandLine);
530
531                         // Set it back
532                         managedContact.setContactLandLineNumber(managedLandLine);
533                 }
534
535                 // Trace message
536                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: entry.managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
537
538                 // Return updated user instance
539                 return managedUser;
540         }
541
542 }