From d0d670accbd4c275c3e9869acd670a7e9c42d8bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 22 Apr 2017 22:04:26 +0200 Subject: [PATCH] Please cherry-pick: - Let's always call super constructor (not the default one, of course), maybe one day there will be something added - sorted members a bit - some constructors still contain EJB-lookup code, moved to init() (@PostConstruct) method MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../beans/BaseAddressbookController.java | 108 ++++++++- .../AddressbookWebSessionBean.java | 5 +- ...essbookConfirmationLinkWebRequestBean.java | 34 +-- ...AddressbookAdminContactWebRequestBean.java | 2 + .../AddressbookContactWebSessionBean.java | 5 +- ...ssbookAdminContactPhoneWebRequestBean.java | 34 ++- ...AddressbookContactPhoneWebSessionBean.java | 206 ++++++++++++++---- ...sbookContactPhoneWebSessionController.java | 17 +- ...AddressbookAdminCountryWebRequestBean.java | 2 + .../AddressbookCountryWebApplicationBean.java | 2 + .../AddressbookEmailChangeWebSessionBean.java | 4 +- .../AddressbookFeatureWebApplicationBean.java | 2 + .../AddressbookGenderWebApplicationBean.java | 2 + .../AddressbookWebRequestHelperBean.java | 3 + .../AddressbookLocalizationSessionBean.java | 2 + .../AddressbookUserLoginWebSessionBean.java | 5 +- ...ressbookUserLoginWebSessionController.java | 2 +- ...bookAdminMobileProviderWebRequestBean.java | 2 + ...dressbookMobileProviderWebRequestBean.java | 2 + .../AddressbookAdminPhoneWebRequestBean.java | 3 + .../AddressbookPhoneWebApplicationBean.java | 25 ++- .../AddressbookUserProfileWebRequestBean.java | 4 +- ...ressbookProfileModeWebApplicationBean.java | 2 + ...AddressbookUserRegisterWebSessionBean.java | 14 +- .../AddressbookResendLinkWebSessionBean.java | 12 +- .../AddressbookSharesWebSessionBean.java | 2 +- .../AddressbookAdminUserWebRequestBean.java | 2 + .../user/AddressbookUserWebSessionBean.java | 4 +- ...AddressbookUserPasswordWebRequestBean.java | 4 +- 29 files changed, 404 insertions(+), 107 deletions(-) rename src/java/org/mxchange/addressbook/beans/login/{ => user}/AddressbookUserLoginWebSessionBean.java (99%) rename src/java/org/mxchange/addressbook/beans/login/{ => user}/AddressbookUserLoginWebSessionController.java (98%) diff --git a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java index 1b736392..fe6b533e 100644 --- a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java +++ b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java @@ -17,8 +17,14 @@ package org.mxchange.addressbook.beans; import java.io.Serializable; +import java.security.Principal; +import java.text.MessageFormat; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; +import org.mxchange.jusercore.model.user.UserUtils; /** * A general controller @@ -32,6 +38,35 @@ public abstract class BaseAddressbookController implements Serializable { */ private static final long serialVersionUID = 50_837_597_127_567_140L; + /** + * Protected constructor + */ + protected BaseAddressbookController () { + } + + /** + * Determines principal's name or returns null if no principal (security) is + * set. + *

+ * @return Principal's name or null + */ + protected String determinePrincipalName () { + // Get principal + Principal userPrincipal = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(); + + // Init with null + String principalName = null; + + // Is the principal set? + if (userPrincipal instanceof Principal) { + // Get principal's name + principalName = userPrincipal.getName(); + } + + // Return it + return principalName; + } + /** * Returns given property key or throws an exception if not found. *

@@ -66,7 +101,7 @@ public abstract class BaseAddressbookController implements Serializable { // Is it null? if (null == contextValue) { // Throw NPE - throw new NullPointerException("parameterKey=" + parameterKey + " is not set."); + throw new NullPointerException(MessageFormat.format("parameterKey={0} is not set.", parameterKey)); //NOI18N } // Return it @@ -91,21 +126,45 @@ public abstract class BaseAddressbookController implements Serializable { } // Try to get context parameter - String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N + String contextParameter = this.getStringContextParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N // Is it set and true? - boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.equals("true"))); //NOI18N + boolean isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE); // Return it return isEnabled; } + /** + * Checks if given password is to weak to be used + *

+ * @param password Clear-text password + *

+ * @return Whether the entered password is to weak + */ + protected boolean isWeakPassword (final String password) { + // Is parameter set? + if (null == password) { + // Throw NPE + throw new NullPointerException("password is null"); //NOI18N + } + + // Get score value + double passwordScore = UserUtils.calculatePasswordScore(password); + + // Is the score within range? + boolean isWeak = (passwordScore <= this.getIntegerContextParameter("min_user_password_score")); //NOI18N + + // Return it + return isWeak; + } + /** * Shows a faces message for given causing exception. The message from the * exception is being inserted into the message. *

* @param clientId Client id to send message to - * @param cause Causing exception + * @param cause Causing exception */ protected void showFacesMessage (final String clientId, final Throwable cause) { // Get context and add message @@ -113,12 +172,47 @@ public abstract class BaseAddressbookController implements Serializable { } /** - * Shows a faces message with given message. + * Shows a faces message with given message (i18n) key. *

* @param clientId Client id to send message to - * @param message Causing exception + * @param i18nKey Message key + *

+ * @throws NullPointerException If clientId or i18nKey is null + * @throws IllegalArgumentException If clientId or i18nKey is empty */ - protected void showFacesMessage (final String clientId, final String message) { + protected void showFacesMessage (final String clientId, final String i18nKey) throws NullPointerException, IllegalArgumentException { + // Both parameter must be valid + if (null == clientId) { + // Throw NPE + throw new NullPointerException("clientId is null"); //NOI18N + } else if (clientId.isEmpty()) { + // Is empty + throw new IllegalArgumentException("clientId is null"); //NOI18N + } else if (null == i18nKey) { + // Throw NPE + throw new NullPointerException("i18nKey is null"); //NOI18N + } else if (i18nKey.isEmpty()) { + // Is empty + throw new IllegalArgumentException("i18nKey is null"); //NOI18N + } + + // Get current locale + Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale(); + + // Get bundle bundle + ResourceBundle bundle = ResourceBundle.getBundle("org.mxchange.localization.bundle", locale); + + // Default is i18nKey + String message = i18nKey; + + // Try it + try { + // Get message + message = bundle.getString(i18nKey); + } catch (final MissingResourceException ex) { + // Did not find it, ignored + } + // Get context and add message FacesContext.getCurrentInstance().addMessage(clientId, new FacesMessage(message)); } diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java index 967e2cb1..6a6b9fc2 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java @@ -36,7 +36,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote; import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent; import org.mxchange.jaddressbookcore.events.addressbook.ObservableAddressbookLoadedEvent; @@ -119,6 +119,9 @@ public class AddressbookWebSessionBean extends BaseAddressbookController impleme * Default constructor */ public AddressbookWebSessionBean () { + // Call super constructor + super(); + // Init list AddressbookWebSessionBean.countSharesList = new ConcurrentHashMap<>(0); } diff --git a/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java index ea05dcf6..d82c75ff 100644 --- a/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java @@ -31,6 +31,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; +import org.mxchange.addressbook.beans.helper.AddressbookWebRequestHelperController; import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; @@ -40,7 +41,6 @@ import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.status.UserAccountStatus; -import org.mxchange.addressbook.beans.helper.AddressbookWebRequestHelperController; /** * A web request bean for confirmation link handling @@ -73,22 +73,34 @@ public class AddressbookConfirmationLinkWebRequestBean extends BaseAddressbookCo private UserSessionBeanRemote userBean; /** - * User controller + * Event being fired when a user has confirmed the account */ @Inject - private AddressbookUserWebSessionController userController; + @Any + private Event userConfirmedEvent; /** - * Event being fired when a user has confirmed the account + * User controller */ @Inject - @Any - private Event userConfirmedEvent; + private AddressbookUserWebSessionController userController; /** * Default constructor */ public AddressbookConfirmationLinkWebRequestBean () { + // Call super constructor + super(); + } + + @Override + public String getConfirmationKey () { + return this.confirmationKey; + } + + @Override + public void setConfirmationKey (final String confirmationKey) { + this.confirmationKey = confirmationKey; } /** @@ -109,16 +121,6 @@ public class AddressbookConfirmationLinkWebRequestBean extends BaseAddressbookCo } } - @Override - public String getConfirmationKey () { - return this.confirmationKey; - } - - @Override - public void setConfirmationKey (final String confirmationKey) { - this.confirmationKey = confirmationKey; - } - @Override public void maybeConfirmUserAccount () { // Is the confirmation key set? diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java index 9314278c..91a8c59f 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java @@ -247,6 +247,8 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro * Default constructor */ public AddressbookAdminContactWebRequestBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java index 2bc2ef61..82dcded2 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java @@ -33,7 +33,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; @@ -234,6 +234,9 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController * Default constructor */ public AddressbookContactWebSessionBean () { + // Call super constructor + super(); + // Init lists/maps this.contactList = new LinkedList<>(); this.emailAddressList = new LinkedList<>(); diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java index 18897082..676c7c6b 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java @@ -17,6 +17,7 @@ package org.mxchange.addressbook.beans.contact.phone; import java.text.MessageFormat; +import javax.annotation.PostConstruct; import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Event; import javax.enterprise.event.Observes; @@ -140,20 +141,11 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookC * Default constructor */ public AddressbookAdminContactPhoneWebRequestBean () { + // Call super constructor + super(); + // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName()); // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller)); - - // Try it - try { - // Get initial context - Context context = new InitialContext(); - - // Try to lookup the beans - this.adminPhoneBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminContactPhone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N - } catch (final NamingException e) { - // Throw again - throw new FaceletException(e); - } } /** @@ -414,6 +406,24 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookC return "admin_show_contact"; //NOI18N } + /** + * Post-construction method + */ + @PostConstruct + public void init () { + // Try it + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup the beans + this.adminPhoneBean = (AdminContactsPhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminContactPhone!org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote"); //NOI18N + } catch (final NamingException e) { + // Throw again + throw new FaceletException(e); + } + } + @Override public String unlinkFaxContactData () { // Is all data set diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java index faebb4a6..fda02239 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java @@ -22,22 +22,23 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; -import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Observes; -import javax.faces.view.facelets.FaceletException; import javax.inject.Inject; import javax.inject.Named; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; -import org.mxchange.addressbook.beans.phone.AddressbookAdminPhoneWebRequestController; +import org.mxchange.addressbook.beans.helper.AddressbookWebRequestHelperController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent; -import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote; +import org.mxchange.jcontacts.events.fax.unlinked.ObservableAdminUnlinkedFaxNumberEvent; +import org.mxchange.jcontacts.events.landline.unlinked.ObservableAdminUnlinkedLandLineNumberEvent; +import org.mxchange.jcontacts.events.mobile.unlinked.ObservableAdminUnlinkedMobileNumberEvent; +import org.mxchange.jphone.phonenumbers.DialableNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; +import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; /** @@ -55,15 +56,10 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro private static final long serialVersionUID = 542_145_347_916L; /** - * Remote EJB for phone number (administrative) - */ - private AdminPhoneSessionBeanRemote adminPhoneBean; - - /** - * Administrative phone controller + * Bean helper */ @Inject - private AddressbookAdminPhoneWebRequestController adminPhoneController; + private AddressbookWebRequestHelperController beanHelper; /** * General contact controller @@ -72,15 +68,19 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro private AddressbookContactWebSessionController contactController; /** - * "Cache" for contact lists, mostly only one is assigned. So this cache - * shouldn't grow beyond control. + * "Cache" for contact's mobile, land-line and fax numbers. Currently one + * per each type is supported. Maybe later this will change into a OneToMany + * relationship (one contact, many numbers). */ - private final Map> contacts; + private final Map> contacts; /** * Default constructor */ public AddressbookContactPhoneWebSessionBean () { + // Call super constructor + super(); + // Init lists/maps this.contacts = new HashMap<>(10); } @@ -104,7 +104,7 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro throw new NullPointerException("event.addedContact.contactId is null"); //NOI18N } else if (event.getAddedContact().getContactId() < 1) { // Not valid - throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N //NOI18N + throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N } // Clear this bean @@ -112,7 +112,7 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro } /** - * Event observer for newly added users by adminstrator + * Event observer for newly added users by administrator *

* @param event Event being fired */ @@ -136,6 +136,90 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro this.clear(); } + /** + * Event observer for unlinked fax contact by administrators + *

+ * @param event Unlinked fax contact event + */ + public void afterAdminUnlinkedFaxContactDataEvent (@Observes final ObservableAdminUnlinkedFaxNumberEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getUnlinkedFaxNumber() == null) { + // Throw NPE again + throw new NullPointerException("event.unlinkedFaxNumber is null"); //NOI18N + } else if (event.getUnlinkedFaxNumber().getPhoneId() == null) { + // userId is null + throw new NullPointerException("event.unlinkedFaxNumber.contactId is null"); //NOI18N + } else if (event.getUnlinkedFaxNumber().getPhoneId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUnlinkedFaxNumber(), event.getUnlinkedFaxNumber().getPhoneId())); //NOI18N + } + + // Remove it from list + this.contacts.remove(event.getUnlinkedFaxNumber()); + + // Clear all data + this.clear(); + } + + /** + * Event observer for unlinked land-line contact by administrators + *

+ * @param event Unlinked land-line contact event + */ + public void afterAdminUnlinkedLandLineContactDataEvent (@Observes final ObservableAdminUnlinkedLandLineNumberEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getUnlinkedLandLineNumber() == null) { + // Throw NPE again + throw new NullPointerException("event.unlinkedLandLineNumber is null"); //NOI18N + } else if (event.getUnlinkedLandLineNumber().getPhoneId() == null) { + // userId is null + throw new NullPointerException("event.unlinkedLandLineNumber.contactId is null"); //NOI18N + } else if (event.getUnlinkedLandLineNumber().getPhoneId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUnlinkedLandLineNumber(), event.getUnlinkedLandLineNumber().getPhoneId())); //NOI18N + } + + // Remove it from list + this.contacts.remove(event.getUnlinkedLandLineNumber()); + + // Clear all data + this.clear(); + } + + /** + * Event observer for unlinked mobile contact by administrators + *

+ * @param event Unlinked mobile contact event + */ + public void afterAdminUnlinkedMobileContactDataEvent (@Observes final ObservableAdminUnlinkedMobileNumberEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getUnlinkedMobileNumber() == null) { + // Throw NPE again + throw new NullPointerException("event.unlinkedMobileNumber is null"); //NOI18N + } else if (event.getUnlinkedMobileNumber().getPhoneId() == null) { + // userId is null + throw new NullPointerException("event.unlinkedMobileNumber.contactId is null"); //NOI18N + } else if (event.getUnlinkedMobileNumber().getPhoneId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUnlinkedMobileNumber(), event.getUnlinkedMobileNumber().getPhoneId())); //NOI18N + } + + // Remove it from list + this.contacts.remove(event.getUnlinkedMobileNumber()); + + // Clear all data + this.clear(); + } + /** * Event observer for updated contact data by administrators *

@@ -156,17 +240,20 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro // Not avalid id throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N } + + // Clear all data + this.clear(); } @Override - public List allMobileContacts () { + public List allFaxNumberContacts () { // Get id - Long phoneId = this.adminPhoneController.getMobileNumber().getPhoneId(); + DialableFaxNumber faxNumber = this.beanHelper.getFaxNumber(); // Is cache there? - if (this.contacts.containsKey(phoneId)) { + if (this.contacts.containsKey(faxNumber)) { // Return cached version - return this.contacts.get(phoneId); + return this.contacts.get(faxNumber); } else { // Ask bean List list = new LinkedList<>(); @@ -174,32 +261,77 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro // "Walk" through all contacts for (final Contact contact : this.contactController.allContacts()) { // Is mobile instance the same? - if (Objects.equals(contact.getContactMobileNumber(), this.adminPhoneController.getMobileNumber())) { + if (Objects.equals(contact.getContactFaxNumber(), this.beanHelper.getFaxNumber())) { // Found one list.add(contact); } } // Store result in cache - this.contacts.put(phoneId, list); + this.contacts.put(faxNumber, list); // Return now-cached list return list; } } - @PostConstruct - public void init () { - // Try it - try { - // Get initial context - Context context = new InitialContext(); - - // Try to lookup the beans - this.adminPhoneBean = (AdminPhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminphone!org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote"); //NOI18N - } catch (final NamingException e) { - // Throw again - throw new FaceletException(e); + @Override + public List allLandLineNumberContacts () { + // Get id + DialableLandLineNumber landLineNumber = this.beanHelper.getLandLineNumber(); + + // Is cache there? + if (this.contacts.containsKey(landLineNumber)) { + // Return cached version + return this.contacts.get(landLineNumber); + } else { + // Ask bean + List list = new LinkedList<>(); + + // "Walk" through all contacts + for (final Contact contact : this.contactController.allContacts()) { + // Is mobile instance the same? + if (Objects.equals(contact.getContactLandLineNumber(), this.beanHelper.getLandLineNumber())) { + // Found one + list.add(contact); + } + } + + // Store result in cache + this.contacts.put(landLineNumber, list); + + // Return now-cached list + return list; + } + } + + @Override + public List allMobileNumberContacts () { + // Get id + DialableMobileNumber mobileNumber = this.beanHelper.getMobileNumber(); + + // Is cache there? + if (this.contacts.containsKey(mobileNumber)) { + // Return cached version + return this.contacts.get(mobileNumber); + } else { + // Ask bean + List list = new LinkedList<>(); + + // "Walk" through all contacts + for (final Contact contact : this.contactController.allContacts()) { + // Is mobile instance the same? + if (Objects.equals(contact.getContactMobileNumber(), this.beanHelper.getMobileNumber())) { + // Found one + list.add(contact); + } + } + + // Store result in cache + this.contacts.put(mobileNumber, list); + + // Return now-cached list + return list; } } diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionController.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionController.java index d6ced2f7..c22353d7 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionController.java @@ -30,15 +30,24 @@ import org.mxchange.jcontacts.contact.Contact; public interface AddressbookContactPhoneWebSessionController extends Serializable { /** - * Minimum password length + * Getter for all contacts having current fax number linked + *

+ * @return List of all linked contacts + */ + List allFaxNumberContacts (); + + /** + * Getter for all contacts having current land-line number linked + *

+ * @return List of all linked contacts */ - public static final Integer MINIMUM_PASSWORD_LENGTH = 5; + List allLandLineNumberContacts (); /** - * Getter for all contacts having current cellphone instance linked + * Getter for all contacts having current mobile number linked *

* @return List of all linked contacts */ - List allMobileContacts (); + List allMobileNumberContacts (); } diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java index 3ed5fb32..2012ce69 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java @@ -103,6 +103,8 @@ public class AddressbookAdminCountryWebRequestBean extends BaseAddressbookContro * Default constructor */ public AddressbookAdminCountryWebRequestBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java index 68366ba0..34f2ecc3 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java @@ -59,6 +59,8 @@ public class AddressbookCountryWebApplicationBean extends BaseAddressbookControl * Default constructor */ public AddressbookCountryWebApplicationBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java index ea0b5217..4af4b189 100644 --- a/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java @@ -29,7 +29,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; @@ -88,6 +88,8 @@ public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookControl * Default constructor */ public AddressbookEmailChangeWebSessionBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java index 09ddd617..68d085ca 100644 --- a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java @@ -39,6 +39,8 @@ public class AddressbookFeatureWebApplicationBean extends BaseAddressbookControl * Default constructor */ public AddressbookFeatureWebApplicationBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java index 5e6c65c4..381b86f6 100644 --- a/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java @@ -42,6 +42,8 @@ public class AddressbookGenderWebApplicationBean extends BaseAddressbookControll * Default constructor */ public AddressbookGenderWebApplicationBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java index a7aa605c..704b770a 100644 --- a/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelperBean.java @@ -102,6 +102,9 @@ public class AddressbookWebRequestHelperBean implements AddressbookWebRequestHel * Default constructor */ public AddressbookWebRequestHelperBean () { + // Call super constructor + super(); + // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName()); // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller)); } diff --git a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java index 89008aaa..121f097e 100644 --- a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java @@ -53,6 +53,8 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle * Default constructor */ public AddressbookLocalizationSessionBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionBean.java similarity index 99% rename from src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java rename to src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionBean.java index 6d6baf1f..44e3c1e3 100644 --- a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionBean.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.addressbook.beans.login; +package org.mxchange.addressbook.beans.login.user; import java.text.MessageFormat; import java.util.Collections; @@ -144,6 +144,9 @@ public class AddressbookUserLoginWebSessionBean extends BaseAddressbookControlle * Default constructor */ public AddressbookUserLoginWebSessionBean () { + // Call super constructor + super(); + // Defaul template is guest this.baseTemplatePathName = GUEST_BASE_TEMPLATE_NAME; } diff --git a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionController.java b/src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionController.java similarity index 98% rename from src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionController.java rename to src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionController.java index 04276dac..25f80a73 100644 --- a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/login/user/AddressbookUserLoginWebSessionController.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.addressbook.beans.login; +package org.mxchange.addressbook.beans.login.user; import java.io.Serializable; import java.util.List; diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java index 3cdee2aa..02b7be90 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java @@ -94,6 +94,8 @@ public class AddressbookAdminMobileProviderWebRequestBean extends BaseAddressboo * Default constructor */ public AddressbookAdminMobileProviderWebRequestBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java index 2b2f8b54..14947e55 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java @@ -59,6 +59,8 @@ public class AddressbookMobileProviderWebRequestBean extends BaseAddressbookCont * Default constructor */ public AddressbookMobileProviderWebRequestBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminPhoneWebRequestBean.java index ee93f488..59d7da76 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminPhoneWebRequestBean.java @@ -196,6 +196,9 @@ public class AddressbookAdminPhoneWebRequestBean extends BaseAddressbookControll * Default constructor */ public AddressbookAdminPhoneWebRequestBean () { + // Call super constructor + super(); + // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName()); // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller)); } diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookPhoneWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookPhoneWebApplicationBean.java index 080d5be8..f205319b 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookPhoneWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookPhoneWebApplicationBean.java @@ -85,17 +85,8 @@ public class AddressbookPhoneWebApplicationBean extends BaseAddressbookControlle * Default constructor */ public AddressbookPhoneWebApplicationBean () { - // Try it - try { - // Get initial context - Context context = new InitialContext(); - - // Try to lookup the beans - this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N - } catch (final NamingException e) { - // Throw it again - throw new FaceletException(e); - } + // Call super constructor + super(); // Init all lists this.mobileNumbers = new LinkedList<>(); @@ -450,6 +441,18 @@ public class AddressbookPhoneWebApplicationBean extends BaseAddressbookControlle */ @PostConstruct public void init () { + // Try it + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup the beans + this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/addressbook-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N + } catch (final NamingException e) { + // Throw it again + throw new FaceletException(e); + } + // All phone numbers this.allMobileNumbers().addAll(this.phoneBean.allMobileNumbers()); this.allFaxNumbers().addAll(this.phoneBean.allFaxNumbers()); diff --git a/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java index 1aae30fc..494f73cf 100644 --- a/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java @@ -23,7 +23,7 @@ import javax.faces.view.facelets.FaceletException; import javax.inject.Inject; import javax.inject.Named; import org.mxchange.addressbook.beans.BaseAddressbookController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.model.user.User; @@ -59,6 +59,8 @@ public class AddressbookUserProfileWebRequestBean extends BaseAddressbookControl * Default constructor */ public AddressbookUserProfileWebRequestBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java index b0ee1649..01ab494b 100644 --- a/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java @@ -40,6 +40,8 @@ public class AddressbookProfileModeWebApplicationBean extends BaseAddressbookCon * Default constructor */ public AddressbookProfileModeWebApplicationBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java index 5a273fee..adc73ed1 100644 --- a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java @@ -83,22 +83,24 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro private UserRegistrationSessionBeanRemote registerBean; /** - * An en event fireable when a new user has registered + * User controller */ @Inject - @Any - private Event registeredEvent; + private AddressbookUserWebSessionController userController; /** - * User controller + * An en event fireable when a new user has registered */ @Inject - private AddressbookUserWebSessionController userController; + @Any + private Event userRegisteredEvent; /** * Default constructor */ public AddressbookUserRegisterWebSessionBean () { + // Call super constructor + super(); } @Override @@ -165,7 +167,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro assert (registeredUser.getUserId() instanceof Long) : "registeredUser.userId is null after registerUser() was called."; //NOI18N // Fire event - this.registeredEvent.fire(new UserRegisteredEvent(registeredUser)); + this.userRegisteredEvent.fire(new UserRegisteredEvent(registeredUser)); // All fine, redirect to proper page return "register_done"; //NOI18N diff --git a/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkWebSessionBean.java index bf1cfe4a..ea1837bc 100644 --- a/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/resendlink/AddressbookResendLinkWebSessionBean.java @@ -54,17 +54,17 @@ public class AddressbookResendLinkWebSessionBean extends BaseAddressbookControll */ private String emailAddress; - /** - * EJB for resending confirmation link - */ - private ResendLinkSessionBeanRemote resendLinkBean; - /** * Localization controller */ @Inject private AddressbookLocalizationSessionController localizationController; + /** + * EJB for resending confirmation link + */ + private ResendLinkSessionBeanRemote resendLinkBean; + /** * Regular user controller */ @@ -75,6 +75,8 @@ public class AddressbookResendLinkWebSessionBean extends BaseAddressbookControll * Default constructor */ public AddressbookResendLinkWebSessionBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java index ea23f50e..eb1210a6 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java @@ -32,7 +32,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.model.shared.SharedAddressbooksSessionBeanRemote; import org.mxchange.jaddressbookcore.events.sharing.StartedAddressbookSharingEvent; import org.mxchange.jaddressbookcore.events.sharing.type.SharingType; diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index 9b4fe504..e6f1aeb2 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -197,6 +197,8 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle * Default constructor */ public AddressbookAdminUserWebRequestBean () { + // Call super constructor + super(); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index 9768f597..338ae7f0 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -35,7 +35,7 @@ import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; @@ -149,6 +149,8 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp * Default constructor */ public AddressbookUserWebSessionBean () { + // Call super constructor + super(); } /** diff --git a/src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestBean.java index 63e0de0f..e9b013b6 100644 --- a/src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestBean.java @@ -29,7 +29,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent; import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; @@ -99,6 +99,8 @@ public class AddressbookUserPasswordWebRequestBean extends BaseAddressbookContro * Default constructor */ public AddressbookUserPasswordWebRequestBean () { + // Call super constructor + super(); } @Override -- 2.39.5