]> 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, UserNotFoundException {
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.setUserEntryUpdated(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) throws UserNotFoundException {
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 UserNotFoundException(detachedUser.getUserId());
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                 // Copy all data
294                 Users.copyUserData(detachedUser, foundUser);
295
296                 // Merge user
297                 final User managedUser = this.getEntityManager().merge(foundUser);
298
299                 // Should be found!
300                 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", managedUser.getUserId()); //NOI18N
301
302                 // Copy all data
303                 Users.copyAll(detachedUser, managedUser);
304
305                 // Set as updated
306                 managedUser.setUserEntryUpdated(new Date());
307
308                 // Trace message
309                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
310
311                 // Return updated instance
312                 return managedUser;
313         }
314
315         @Override
316         public PasswordHistory updateUserPassword (final User user, final String baseUrl) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException {
317                 // Trace message
318                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
319
320                 // user should not be null
321                 if (null == user) {
322                         // Throw NPE
323                         throw new NullPointerException("user is null"); //NOI18N
324                 } else if (user.getUserId() == null) {
325                         // Throw NPE again
326                         throw new NullPointerException("user.userId is null"); //NOI18N
327                 } else if (user.getUserId() < 1) {
328                         // Not valid number
329                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N
330                 } else if (user.getUserName() == null) {
331                         // Throw NPE again
332                         throw new NullPointerException("user.userName is null"); //NOI18N
333                 } else if (user.getUserName().isEmpty()) {
334                         // Empty string
335                         throw new IllegalArgumentException("user.userName is empty"); //NOI18N
336                 } else if (user.getUserAccountStatus() == null) {
337                         // Throw NPE
338                         throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
339                 } else if (user.getUserContact() == null) {
340                         // Throw it again
341                         throw new NullPointerException("user.userContact is null"); //NOI18N
342                 } else if (user.getUserContact().getContactId() == null) {
343                         // .. and again
344                         throw new NullPointerException("user.userContact.contactId is null"); //NOI18N
345                 } else if (user.getUserContact().getContactId() < 1) {
346                         // Invalid id
347                         throw new IllegalArgumentException(MessageFormat.format("user.userContact.contactId={0} is invalid", user.getUserContact().getContactId())); //NOI18N
348                 } else if (user.getUserContact().getContactPersonalTitle() == null) {
349                         // Throw NPE again
350                         throw new NullPointerException("user.userContact.contactPersonalTitle is null"); //NOI18N
351                 } else if (!this.ifUserExists(user)) {
352                         // User does not exist
353                         throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
354                 } else if (null == baseUrl) {
355                         // Throw it again
356                         throw new NullPointerException("baseUrl is null"); //NOI18N
357                 } else if (baseUrl.isEmpty()) {
358                         // Invalid parameter
359                         throw new IllegalArgumentException("baseUrl is empty"); //NOI18N
360                 }
361
362                 // Call other method
363                 final User managedUser = this.updateUserData(user);
364
365                 // Update user account
366                 managedUser.setUserEntryUpdated(new Date());
367
368                 // Create history entry
369                 PasswordHistory entry = new UserPasswordHistory(user.getUserEncryptedPassword(), managedUser);
370
371                 // Set created timestamp
372                 entry.setUserPasswordHistoryCreated(new Date());
373
374                 // Merge user to make sure it is not re-persisted
375                 final User mergedUser = this.getEntityManager().merge(managedUser);
376                 entry.setUserPasswordHistoryUser(mergedUser);
377
378                 // Persist it
379                 this.getEntityManager().persist(entry);
380
381                 // Send email to user
382                 this.sendEmail("User password change", "user_password_change", managedUser, baseUrl, null); //NOI18N
383
384                 // Trace message
385                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N
386
387                 // Return it
388                 return entry;
389         }
390
391         @Override
392         public User updateUserPersonalData (final User user) {
393                 // Trace message
394                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
395
396                 // user should not be null
397                 if (null == user) {
398                         // Abort here
399                         throw new NullPointerException("user is null"); //NOI18N
400                 } else if (user.getUserId() == null) {
401                         // Throw NPE again
402                         throw new NullPointerException("user.userId is null"); //NOI18N
403                 } else if (user.getUserId() < 1) {
404                         // Not valid
405                         throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
406                 } else if (user.getUserAccountStatus() == null) {
407                         // Throw NPE again
408                         throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
409                 } else if (!this.ifUserExists(user)) {
410                         // User does not exist
411                         throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
412                 }
413
414                 // Find the instance
415                 final User managedUser = this.getEntityManager().find(user.getClass(), user.getUserId());
416
417                 // Should be found!
418                 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
419
420                 // Copy all data
421                 Users.copyUserData(user, managedUser);
422
423                 // Set as updated
424                 managedUser.setUserEntryUpdated(new Date());
425
426                 // Get contact from it and find it
427                 final Contact foundContact = this.getEntityManager().find(managedUser.getUserContact().getClass(), managedUser.getUserContact().getContactId());
428
429                 // Should be found
430                 assert (foundContact instanceof Contact) : MessageFormat.format("Contact with id {0} not found, but should be.", user.getUserContact().getContactId()); //NOI18N
431
432                 // Debug message
433                 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: contact.contactId={0}", foundContact.getContactId())); //NOI18N
434
435                 // Merge contact instance
436                 final Contact managedContact = this.getEntityManager().merge(foundContact);
437
438                 // Copy all
439                 Contacts.copyAll(managedUser.getUserContact(), managedContact);
440
441                 // Set it back in user
442                 user.setUserContact(managedContact);
443
444                 // Should be found!
445                 assert (managedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not merged, but should be.", user.getUserContact().getContactId()); //NOI18N
446
447                 // Get mobile instance
448                 final DialableMobileNumber mobileNumber = managedContact.getContactMobileNumber();
449
450                 // Is there a  mobile instance set?
451                 if (mobileNumber instanceof DialableMobileNumber) {
452                         // Debug message
453                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getMobileId())); //NOI18N
454
455                         // Then find it, too
456                         final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getMobileId());
457
458                         // Should be there
459                         assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N
460
461                         // Copy all
462                         MobileNumbers.copyMobileNumberData(managedUser.getUserContact().getContactMobileNumber(), foundMobile);
463
464                         // Then merge it, too
465                         final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile);
466
467                         // Should be there
468                         assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getMobileId()); //NOI18N
469
470                         // Copy all
471                         MobileNumbers.copyAll(managedUser.getUserContact().getContactMobileNumber(), managedMobile);
472
473                         // Set it back
474                         managedContact.setContactMobileNumber(this.createManaged(mobileNumber, mobileNumber));
475                 }
476
477                 // Get mobile instance
478                 final DialableFaxNumber faxNumber = managedContact.getContactFaxNumber();
479
480                 // Is there a  fax instance set?
481                 if (faxNumber instanceof DialableFaxNumber) {
482                         // Debug message
483                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: faxNumber.phoneId={0} is being updated ...", faxNumber.getPhoneId())); //NOI18N
484
485                         // Then find it, too
486                         final DialableFaxNumber foundFax = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId());
487
488                         // Should be there
489                         assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N
490
491                         // Copy all
492                         FaxNumbers.copyFaxNumberData(managedUser.getUserContact().getContactFaxNumber(), foundFax);
493
494                         // Then merge it, too
495                         final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax);
496
497                         // Should be there
498                         assert (managedFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", managedFax.getPhoneId()); //NOI18N
499
500                         // Copy all
501                         FaxNumbers.copyAll(managedUser.getUserContact().getContactFaxNumber(), managedFax);
502
503                         // Set it back
504                         managedContact.setContactFaxNumber(managedFax);
505                 }
506
507                 // Get mobile instance
508                 final DialableLandLineNumber landLineNumber = managedContact.getContactLandLineNumber();
509
510                 // Is there a  fax instance set?
511                 if (landLineNumber instanceof DialableLandLineNumber) {
512                         // Debug message
513                         this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLineNumber.phoneId={0} is being updated ...", landLineNumber.getPhoneId())); //NOI18N
514
515                         // Then find it, too
516                         final DialableLandLineNumber foundLandLine = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId());
517
518                         // Should be there
519                         assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N
520
521                         // Copy all
522                         LandLineNumbers.copyLandLineNumberData(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine);
523
524                         // Then merge it, too
525                         final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine);
526
527                         // Should be there
528                         assert (managedLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", managedLandLine.getPhoneId()); //NOI18N
529
530                         // Copy all
531                         LandLineNumbers.copyAll(managedUser.getUserContact().getContactLandLineNumber(), managedLandLine);
532
533                         // Set it back
534                         managedContact.setContactLandLineNumber(managedLandLine);
535                 }
536
537                 // Trace message
538                 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: entry.managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
539
540                 // Return updated user instance
541                 return managedUser;
542         }
543
544 }