2 * Copyright (C) 2016 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.jusercore.model.user;
19 import java.text.MessageFormat;
20 import java.util.GregorianCalendar;
21 import java.util.List;
23 import javax.ejb.EJBException;
24 import javax.ejb.Stateless;
25 import javax.mail.Address;
26 import javax.mail.internet.AddressException;
27 import javax.mail.internet.InternetAddress;
28 import javax.persistence.NoResultException;
29 import javax.persistence.PersistenceException;
30 import javax.persistence.Query;
31 import org.mxchange.jcontacts.contact.Contact;
32 import org.mxchange.jjobs.database.BaseJobsDatabaseBean;
33 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
34 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
35 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
36 import org.mxchange.jusercore.exceptions.UserNotFoundException;
37 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
38 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
39 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
40 import org.mxchange.jusercore.model.register.UserRegistrationSessionBeanRemote;
41 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
42 import org.mxchange.jusercore.model.user.password_history.UserPasswordHistory;
43 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
44 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
49 * @author Roland Haeder<roland@mxchange.org>
51 @Stateless (name = "user", description = "A bean handling the user data")
52 public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSessionBeanRemote {
57 private static final long serialVersionUID = 542_145_347_916L;
63 private UserRegistrationSessionBeanRemote registerBean;
68 public JobsUserSessionBean () {
72 @SuppressWarnings ("unchecked")
73 public List<User> allMemberPublicVisibleUsers () {
75 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMemberPublicVisibleUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
78 Query query = this.getEntityManager().createNamedQuery("AllMemberPublicUsers", LoginUser.class); //NOI18N
81 query.setParameter("status", UserAccountStatus.CONFIRMED); //NOI18N
82 query.setParameter("members", ProfileMode.MEMBERS); //NOI18N
83 query.setParameter("public", ProfileMode.PUBLIC); //NOI18N
86 List<User> users = query.getResultList();
89 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMemberPublicVisibleUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
96 @SuppressWarnings ("unchecked")
97 public List<User> allPublicUsers () {
99 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allPublicUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
102 Query query = this.getEntityManager().createNamedQuery("AllPublicUsers", LoginUser.class); //NOI18N
105 query.setParameter("status", UserAccountStatus.CONFIRMED); //NOI18N
106 query.setParameter("mode", ProfileMode.PUBLIC); //NOI18N
109 List<User> users = query.getResultList();
112 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allPublicUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
119 @SuppressWarnings ("unchecked")
120 public List<User> allUsers () {
122 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
125 Query query = this.getEntityManager().createNamedQuery("AllUsers", LoginUser.class); //NOI18N
128 List<User> users = query.getResultList();
131 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
138 public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException {
140 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
142 // Parameter must be valid
145 throw new NullPointerException("user is null"); //NOI18N
146 } else if (user.getUserId() == null) {
148 throw new NullPointerException("user.userId is null"); //NOI18N
149 } else if (user.getUserId() < 1) {
151 throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N
152 } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
153 // Account is already confirmed
154 throw new UserStatusConfirmedException(user);
155 } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
156 // Account is already confirmed
157 throw new UserStatusLockedException(user);
158 } else if (user.getUserConfirmKey() == null) {
160 throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
163 // Update user status and remove confirmation key
164 user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
165 user.setUserConfirmKey(null);
166 user.setUserUpdated(new GregorianCalendar());
168 // Update user account
169 User updatedUser = this.updateUserData(user);
172 Address emailAddress;
175 // Create email address and set
176 emailAddress = new InternetAddress(updatedUser.getUserContact().getContactEmailAddress());
177 } catch (final AddressException ex) {
179 throw new EJBException(ex);
183 this.sendEmail("Account confirmed", "account_confirmed", emailAddress, updatedUser, baseUrl); //NOI18N
186 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: updatedUser={1} - EXIT!", this.getClass().getSimpleName(), updatedUser)); //NOI18N
188 // Return updated instance
193 public User fillUserData (final User user) {
195 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
197 // user should not be null
200 throw new NullPointerException("user is null"); //NOI18N
204 Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
207 query.setParameter("param", user.getUserName()); //NOI18N
209 // Initialize variable
210 User foundUser = null;
214 // Try to get single result
215 foundUser = (User) query.getSingleResult();
216 } catch (final NoResultException ex) {
218 this.getLoggerBeanLocal().logException(ex);
222 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: foundUser={1} - EXIT!", this.getClass().getSimpleName(), foundUser)); //NOI18N
224 // Return prepared instance
229 public User findUserById (final Long userId) throws UserNotFoundException {
231 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findUserById: userId={1} - CALLED!", this.getClass().getSimpleName(), userId)); //NOI18N
233 // Is the parameter valid?
234 if (null == userId) {
236 throw new NullPointerException("userId is null"); //NOI18N
237 } else if (userId < 1) {
239 throw new IllegalArgumentException(MessageFormat.format("userId={0} is not valid.", userId)); //NOI18N
240 } else if (!this.ifUserIdExists(userId)) {
242 throw new UserNotFoundException(userId);
245 // Create query instance
246 Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N
249 query.setParameter("id", userId); //NOI18N
251 // Fetch the result, it should be there by now
252 User user = (User) query.getSingleResult();
255 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findUserById: user={1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
262 public String generateRandomUserName () {
264 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName - CALLED!", this.getClass().getSimpleName())); //NOI18N
267 List<String> userList = this.getUserNameList();
270 String userName = null;
272 // Loop until a user name is found
273 while ((userName == null) || (userList.contains(userName))) {
274 // Generate random name
275 userName = UserUtils.generateRandomUserName();
279 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName: userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
281 // Found one, so return it
286 @SuppressWarnings ("unchecked")
287 public List<String> getEmailAddressList () {
289 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList: CALLED!", this.getClass().getSimpleName())); //NOI18N
292 Query query = this.getEntityManager().createNamedQuery("AllEmailAddresses", String.class); //NOI18N
295 List<String> emailAddressList = query.getResultList();
298 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList: emailAddressList.size()={1} - EXIT!", this.getClass().getSimpleName(), emailAddressList.size())); //NOI18N
301 return emailAddressList;
305 @SuppressWarnings ("unchecked")
306 public List<String> getUserNameList () {
308 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: CALLED!", this.getClass().getSimpleName())); //NOI18N
311 Query query = this.getEntityManager().createNamedQuery("AllUserNames", String.class); //NOI18N
314 List<String> userNameList = query.getResultList();
317 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: userNameList.size()={1} - EXIT!", this.getClass().getSimpleName(), userNameList.size())); //NOI18N
324 public boolean ifUserExists (final User user) {
326 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
328 // userId should not be null
331 throw new NullPointerException("user is null"); //NOI18N
332 } else if (user.getUserId() == null) {
334 throw new NullPointerException("user.userId is null"); //NOI18N
335 } else if (user.getUserId() < 1) {
337 throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N
341 Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N
344 query.setParameter("id", user.getUserId()); //NOI18N
348 User dummy = (User) query.getSingleResult();
351 this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserExists: dummy.id={0} found.", dummy.getUserId())); //NOI18N
352 } catch (final NoResultException ex) {
354 this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserExists: getSingleResult() returned no result: {0}", ex)); //NOI18N
356 // User name does not exist
358 } catch (final PersistenceException ex) {
359 // Something bad happened
360 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one user {0} found.", user, ex)); //NOI18N
367 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: Found user {1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
374 public boolean ifUserIdExists (final Long userId) {
376 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserIdExists: userId={1} - CALLED!", this.getClass().getSimpleName(), userId)); //NOI18N
378 // userId should not be null
379 if (null == userId) {
381 throw new NullPointerException("userId is null"); //NOI18N
382 } else if (userId < 1) {
384 throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", userId)); //NOI18N
388 Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N
391 query.setParameter("id", userId); //NOI18N
395 User dummy = (User) query.getSingleResult();
398 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserIdExists: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
399 } catch (final NoResultException ex) {
401 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserIdExists: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
403 // User name does not exist
405 } catch (final PersistenceException ex) {
406 // Something bad happened
407 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one user id {0} found.", userId, ex)); //NOI18N
414 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserIdExists: Found userId={1} - EXIT!", this.getClass().getSimpleName(), userId)); //NOI18N
421 public boolean ifUserNameExists (final String userName) {
423 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: userName={1} - CALLED!", this.getClass().getSimpleName(), userName)); //NOI18N
425 // userId should not be null
426 if (null == userName) {
428 throw new NullPointerException("userName is null"); //NOI18N
429 } else if (userName.isEmpty()) {
431 throw new NullPointerException("userName is empty"); //NOI18N
435 Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
438 query.setParameter("param", userName); //NOI18N
442 User dummy = (User) query.getSingleResult();
445 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
446 } catch (final NoResultException ex) {
448 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
450 // User name does not exist
455 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: Found userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
462 public boolean isEmailAddressRegistered (final User user) {
464 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
466 // user should not be null
469 throw new NullPointerException("user is null"); //NOI18N
473 Query query = this.getEntityManager().createNamedQuery("SearchUserByEmailAddress", LoginUser.class); //NOI18N
476 query.setParameter("param", user.getUserContact().getContactEmailAddress()); //NOI18N
480 User dummy = (User) query.getSingleResult();
483 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
484 } catch (final NoResultException ex) {
486 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
488 // Email address does not exist
490 } catch (final PersistenceException ex) {
491 // Something bad happened
492 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one email address {0} found.", user.getUserContact().getContactEmailAddress()), ex); //NOI18N
499 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
506 public boolean isUserNameRegistered (final User user) {
508 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
510 // user should not be null
513 throw new NullPointerException("user is null"); //NOI18N
517 Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N
520 query.setParameter("param", user.getUserName()); //NOI18N
524 User dummy = (User) query.getSingleResult();
527 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
528 } catch (final NoResultException ex) {
530 this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
532 // User name does not exist
534 } catch (final PersistenceException ex) {
535 // Something bad happened
536 this.getLoggerBeanLocal().logWarning(MessageFormat.format("More than one email address {0} found.", user.getUserContact().getContactEmailAddress()), ex); //NOI18N
543 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
550 public User updateUserData (final User user) {
552 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
554 // user should not be null
557 throw new NullPointerException("user is null"); //NOI18N
558 } else if (user.getUserId() == null) {
560 throw new NullPointerException("user.userId is null"); //NOI18N
561 } else if (user.getUserId() < 1) {
563 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N
564 } else if (user.getUserAccountStatus() == null) {
566 throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
567 } else if (!this.ifUserExists(user)) {
568 // User does not exist
569 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
572 // Remove contact instance as this is not updated
573 user.setUserContact(null);
576 User managedUser = this.getEntityManager().find(user.getClass(), user.getUserId());
579 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
582 managedUser.copyAll(user);
585 managedUser.setUserUpdated(new GregorianCalendar());
588 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: managedUser={1} - CALLED!", this.getClass().getSimpleName(), managedUser)); //NOI18N
590 // Return updated instance
595 public PasswordHistory updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException {
597 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
599 // user should not be null
602 throw new NullPointerException("user is null"); //NOI18N
603 } else if (user.getUserId() == null) {
605 throw new NullPointerException("user.userId is null"); //NOI18N
606 } else if (user.getUserId() < 1) {
608 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
609 } else if (user.getUserAccountStatus() == null) {
611 throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
612 } else if (!this.ifUserExists(user)) {
613 // User does not exist
614 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
618 User updatedUser = this.updateUserData(user);
620 // Create history entry
621 PasswordHistory entry = new UserPasswordHistory(user.getUserEncryptedPassword(), updatedUser);
623 // Set created timestamp
624 entry.setUserPasswordHistoryCreated(new GregorianCalendar());
627 this.getEntityManager().persist(entry);
629 // Flush it to get id number back
630 this.getEntityManager().flush();
633 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N
640 public User updateUserPersonalData (final User user) {
642 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
644 // user should not be null
647 throw new NullPointerException("user is null"); //NOI18N
648 } else if (user.getUserId() == null) {
650 throw new NullPointerException("user.userId is null"); //NOI18N
651 } else if (user.getUserId() < 1) {
653 throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N
654 } else if (user.getUserAccountStatus() == null) {
656 throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
657 } else if (!this.ifUserExists(user)) {
658 // User does not exist
659 throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N
663 User managedUser = this.getEntityManager().find(user.getClass(), user.getUserId());
666 assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
669 managedUser.copyAll(user);
672 managedUser.setUserUpdated(new GregorianCalendar());
673 managedUser.getUserContact().setContactUpdated(new GregorianCalendar());
675 // Get contact from it and find it
676 Contact managedContact = this.getEntityManager().find(user.getUserContact().getClass(), user.getUserContact().getContactId());
679 assert (managedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not found, but should be.", user.getUserContact().getContactId()); //NOI18N
682 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: managedContact.contactId={0}", managedContact.getContactId())); //NOI18N
685 managedContact.copyAll(user.getUserContact());
687 // Set it back in user
688 user.setUserContact(managedContact);
691 assert (managedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not merged, but should be.", user.getUserContact().getContactId()); //NOI18N
693 // Get mobile instance
694 DialableMobileNumber mobileNumber = managedContact.getContactMobileNumber();
696 // Is there a mobile instance set?
697 if (mobileNumber instanceof DialableMobileNumber) {
699 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobileNumber.phoneId={0} is being updated ...", mobileNumber.getPhoneId())); //NOI18N
702 managedContact.setContactMobileNumber(this.getManaged(mobileNumber, mobileNumber));
705 // Get mobile instance
706 DialableFaxNumber faxNumber = managedContact.getContactFaxNumber();
708 // Is there a fax instance set?
709 if (faxNumber instanceof DialableFaxNumber) {
711 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: faxNumber.phoneId={0} is being updated ...", faxNumber.getPhoneId())); //NOI18N
714 managedContact.setContactFaxNumber(this.getManaged(faxNumber, faxNumber));
717 // Get mobile instance
718 DialableLandLineNumber landLineNumber = managedContact.getContactLandLineNumber();
720 // Is there a fax instance set?
721 if (landLineNumber instanceof DialableLandLineNumber) {
723 this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLineNumber.phoneId={0} is being updated ...", landLineNumber.getPhoneId())); //NOI18N
726 managedContact.setContactLandLineNumber(this.getManaged(landLineNumber, landLineNumber));
730 this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: entry.managedUser={1} - EXIT!", this.getClass().getSimpleName(), managedUser)); //NOI18N
732 // Return updated user instance