]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 15:53:23 +0000 (17:53 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 18:25:31 +0000 (20:25 +0200)
- removed event-observing methods from interfaces as they should not be called
  from other beans, but only invoked when the specific event has been fired.
- remember these guide-lines:
  1) Use interface for type-hinting objects, not direct class name.
  2) All methods in interface are considered as callable (by you)
  3) If you still need public methods (like it is needed for @PostConstruct or
     @Observes) don't add that method to interface.
  4) This way, the interface is clean and simple (KISS), no exceptions (of,
     course thrown ...)!

Signed-off-by: Roland Häder <roland@mxchange.org>
26 files changed:
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionController.java
src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionBean.java
src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookContactPhoneWebSessionController.java
src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationController.java
src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java
src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionController.java
src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java
src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionController.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestController.java
src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java
src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java
src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/password/AddressbookUserPasswordWebRequestController.java
src/java/org/mxchange/addressbook/converter/cellphone/AddressbookCellphoneConverter.java
src/java/org/mxchange/addressbook/converter/contact/AddressbookContactConverter.java
src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java
src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java
src/java/org/mxchange/addressbook/converter/user/AddressbookUserConverter.java
src/java/org/mxchange/addressbook/validator/birthday/AddressbookBirthdayValidator.java
src/java/org/mxchange/addressbook/validator/user/AddressbookUserIdValidator.java

index c5f824e61024aefb158f90427a94c6722777620b..d69694df5347d57e654615f30a3866e020a58745 100644 (file)
@@ -251,11 +251,13 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.emailAddressList = new LinkedList<>();
        }
 
-       @Override
-       public void afterAdminAddedContact (@Observes final ObservableAdminAddedContactEvent event) {
-               // Trace message
-               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedContact(): event={0} - CALLED!", event)); //NOI18N
-
+       /**
+        * Observes events being fired when an administrator has added a new
+        * contact.
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterAdminAddedContactEvent (@Observes final ObservableAdminAddedContactEvent event) {
                // The event must be valid
                if (null == event) {
                        // Throw NPE
@@ -281,7 +283,11 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.selectableContacts.add(event.getAddedContact());
        }
 
-       @Override
+       /**
+        * Event observer for newly added users by adminstrator
+        * <p>
+        * @param event Event being fired
+        */
        public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedUserEvent(): event={0} - CALLED!", event)); //NOI18N
@@ -305,8 +311,13 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.clear();
        }
 
-       @Override
-       public void afterAdminLinkedUser (@Observes final ObservableAdminLinkedUserEvent event) {
+       /**
+        * Observes events being fired when an administrator has linked a new user
+        * with existing contact data.
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterAdminLinkedUserEvent (@Observes final ObservableAdminLinkedUserEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -332,7 +343,11 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.clear();
        }
 
-       @Override
+       /**
+        * Event observer for updated contact data by administrators
+        * <p>
+        * @param event Updated contact data event
+        */
        public void afterAdminUpdatedContactDataEvent (@Observes final ObservableAdminUpdatedContactEvent event) {
                // event should not be null
                if (null == event) {
@@ -359,8 +374,12 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminUpdatedContactDataEvent(): EXIT!"); //NOI18N
        }
 
-       @Override
-       public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
+       /**
+        * Event observer for new user registrations
+        * <p>
+        * @param event User registration event
+        */
+       public void afterUserRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -392,7 +411,11 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.clear();
        }
 
-       @Override
+       /**
+        * Event observer when user confirmed account.
+        * <p>
+        * @param event Event being fired
+        */
        public void afterUserConfirmedAccount (@Observes final ObservableUserConfirmedAccountEvent event) {
                // event should not be null
                if (null == event) {
@@ -413,7 +436,11 @@ public class AddressbookContactWebSessionBean extends BaseAddressbookController
                this.uniqueAddContact(event.getConfirmedUser().getUserContact());
        }
 
-       @Override
+       /**
+        * Event observer for logged-in user
+        * <p>
+        * @param event Event instance
+        */
        public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
                // event should not be null
                if (null == event) {
index 677db969eafa6757885e755e0f74bd19ff00fed5..131028cc6b2eda2be3a288e91777a38567ffb2b6 100644 (file)
@@ -25,13 +25,6 @@ import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent;
-import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
-import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
-import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.jusercore.events.user.linked.ObservableAdminLinkedUserEvent;
-import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
-import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
 
 /**
  * An interface for user beans
@@ -53,20 +46,6 @@ public interface AddressbookContactWebSessionController extends Serializable {
         */
        List<Contact> allContacts ();
 
-       /**
-        * Event observer for newly added users by adminstrator
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event);
-
-       /**
-        * Event observer when user confirmed account.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterUserConfirmedAccount (final ObservableUserConfirmedAccountEvent event);
-
        /**
         * Updates all data from bean in given contact instance
         * <p>
@@ -86,43 +65,6 @@ public interface AddressbookContactWebSessionController extends Serializable {
         */
        Contact lookupContactById (final Long contactId) throws ContactNotFoundException;
 
-       /**
-        * Event observer for new user registrations
-        * <p>
-        * @param event User registration event
-        */
-       void afterRegistrationEvent (final ObservableUserRegisteredEvent event);
-
-       /**
-        * Observes events being fired when an administrator has added a new
-        * contact.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedContact (final ObservableAdminAddedContactEvent event);
-
-       /**
-        * Observes events being fired when an administrator has linked a new user
-        * with existing contact data.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminLinkedUser (final ObservableAdminLinkedUserEvent event);
-
-       /**
-        * Event observer for updated contact data by administrators
-        * <p>
-        * @param event Updated contact data event
-        */
-       void afterAdminUpdatedContactDataEvent (final ObservableAdminUpdatedContactEvent event);
-
-       /**
-        * Event observer for logged-in user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLoginEvent (final ObservableUserLoggedInEvent event);
-
        /**
         * Creates an instance from all properties
         * <p>
index 5357e3d6bf035a00a455b3823c832c311dd223ad..96219458bbd7f25597cd42c8f4eb34c95efb4dda 100644 (file)
@@ -34,10 +34,10 @@ import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
 import org.mxchange.addressbook.beans.phone.AddressbookAdminPhoneWebRequestController;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote;
-import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
 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.jusercore.events.user.add.ObservableAdminAddedUserEvent;
 
 /**
  * A general contact bean (controller)
@@ -96,8 +96,13 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro
                this.contacts = new HashMap<>(10);
        }
 
-       @Override
-       public void afterAdminAddedContact (@Observes final ObservableAdminAddedContactEvent event) {
+       /**
+        * Observes events being fired when an administrator has added a new
+        * contact.
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterAdminAddedContactEvent (@Observes final ObservableAdminAddedContactEvent event) {
                // The event must be valid
                if (null == event) {
                        // Throw NPE
@@ -117,7 +122,11 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro
                this.clear();
        }
 
-       @Override
+       /**
+        * Event observer for newly added users by adminstrator
+        * <p>
+        * @param event Event being fired
+        */
        public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) {
                // event should not be null
                if (null == event) {
@@ -138,7 +147,11 @@ public class AddressbookContactPhoneWebSessionBean extends BaseAddressbookContro
                this.clear();
        }
 
-       @Override
+       /**
+        * Event observer for updated contact data by administrators
+        * <p>
+        * @param event Updated contact data event
+        */
        public void afterAdminUpdatedContactDataEvent (@Observes final ObservableAdminUpdatedContactEvent event) {
                // event should not be null
                if (null == event) {
index 160826d59b7b5ce173233ecca8832e5d54b21d1b..d6ced2f70c9af5c7bbc8178e947b77d6c3f80a7e 100644 (file)
@@ -20,9 +20,6 @@ import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Local;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
-import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
 
 /**
  * An interface for user beans
@@ -44,26 +41,4 @@ public interface AddressbookContactPhoneWebSessionController extends Serializabl
         */
        List<Contact> allMobileContacts ();
 
-       /**
-        * Event observer for newly added users by adminstrator
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event);
-
-       /**
-        * Observes events being fired when an administrator has added a new
-        * contact.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedContact (final ObservableAdminAddedContactEvent event);
-
-       /**
-        * Event observer for updated contact data by administrators
-        * <p>
-        * @param event Updated contact data event
-        */
-       void afterAdminUpdatedContactDataEvent (final ObservableAdminUpdatedContactEvent event);
-
 }
index 69bfb3e80201ce1bf38f7b6e4ccbc21f91ac9b79..5265fe0e75c96cf35aefe10b6cd1d249aec3c594 100644 (file)
@@ -72,8 +72,13 @@ public class AddressbookCountryWebApplicationBean extends BaseAddressbookControl
                }
        }
 
-       @Override
-       public void afterAdminAddedCountry (@Observes final ObservableAdminAddedCountryEvent event) {
+       /**
+        * Observing method when the event is fired that an administrator added a
+        * new country
+        * <p>
+        * @param event Event instance
+        */
+       public void afterAdminAddedCountryEvent (@Observes final ObservableAdminAddedCountryEvent event) {
                // Is all valid?
                if (null == event) {
                        // Throw NPE
index a6eaaf17bb224d08516fcb1689ad48761acafb41..f1ad5ee198fd8c96eefd7c70dee6201e04884fd8 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.addressbook.beans.country;
 import java.io.Serializable;
 import java.util.List;
 import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
 
 /**
  * An interface for country beans
@@ -35,12 +34,4 @@ public interface AddressbookCountryWebApplicationController extends Serializable
         */
        List<Country> allCountries ();
 
-       /**
-        * Observing method when the event is fired that an administrator added a
-        * new country
-        * <p>
-        * @param event Event instance
-        */
-       void afterAdminAddedCountry (final ObservableAdminAddedCountryEvent event);
-
 }
index c3efdfc0b9a881c7f45ccbb0522d7d5c0db3be9e..4b8dbb84a5d14c41d748332ee72083ee1dc76f13 100644 (file)
@@ -49,7 +49,11 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
         */
        private Locale locale;
 
-       @Override
+       /**
+        * Event observer for logged-in user
+        * <p>
+        * @param event Event instance
+        */
        public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
                // event should not be null
                if (null == event) {
@@ -73,7 +77,11 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                }
        }
 
-       @Override
+       /**
+        * Event observer for logged-out user
+        * <p>
+        * @param event Event instance
+        */
        public void afterUserLogoutEvent (@Observes final ObservableUserLogoutEvent event) {
                // event should not be null
                if (null == event) {
index 35e3be916cdb826572aa70013f8227a9309e10f9..1b68ca32c49661076ebcaddc8eb56f7cf61e9873 100644 (file)
@@ -18,8 +18,6 @@ package org.mxchange.addressbook.beans.localization;
 
 import java.io.Serializable;
 import java.util.Locale;
-import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
-import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent;
 
 /**
  * An interface for localization change beans
@@ -28,20 +26,6 @@ import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent;
  */
 public interface AddressbookLocalizationSessionController extends Serializable {
 
-       /**
-        * Event observer for logged-in user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLoginEvent (final ObservableUserLoggedInEvent event);
-
-       /**
-        * Event observer for logged-out user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLogoutEvent (final ObservableUserLogoutEvent event);
-
        /**
         * Getter for locale
         * <p>
index afcf854f7da1b8e3fad50287c6d0bde5a6fe0ebd..43ad2912ef2a7d151875d274492c2f585a9ecd7b 100644 (file)
@@ -35,8 +35,11 @@ import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
 import org.mxchange.jusercore.container.login.LoginContainer;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
+import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
+import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent;
 import org.mxchange.jusercore.events.logout.UserLogoutEvent;
+import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
@@ -48,9 +51,6 @@ import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
 import org.mxchange.jusercore.model.user.password_history.UserPasswordHistorySessionBeanRemote;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
-import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
-import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent;
-import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
 
 /**
  * A web bean for user registration
@@ -154,7 +154,12 @@ public class AddressbookUserLoginWebSessionBean extends BaseAddressbookControlle
                }
        }
 
-       @Override
+       /**
+        * Method being call after user's password has been updated (and history
+        * entry has been created).
+        * <p>
+        * @param event Event being observed
+        */
        public void afterUserUpdatedPasswordEvent (@Observes final ObservableUpdatedUserPasswordEvent event) {
                // Check parameter
                if (null == event) {
index 7e7c74c2784b935aa27b41115f04a930e7250a77..fdffbe9cdcb92a87a2e5a1efe545bb5293ec51a6 100644 (file)
@@ -21,7 +21,6 @@ import java.util.List;
 import javax.ejb.Local;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
-import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
 
 /**
  * An interface for registration web controllers
@@ -31,14 +30,6 @@ import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserP
 @Local
 public interface AddressbookUserLoginWebSessionController extends Serializable {
 
-       /**
-        * Method being call after user's password has been updated (and history
-        * entry has been created).
-        * <p>
-        * @param event Event being observed
-        */
-       void afterUserUpdatedPasswordEvent (final ObservableUpdatedUserPasswordEvent event);
-
        /**
         * Checks whether given clear-text password is in user's password history.
         * <p>
index 0d214d79f3e9b3c77dd13554a517f65ffef14558..90f094f6287de9c726980cc0754391a5ebc76700 100644 (file)
@@ -72,8 +72,13 @@ public class AddressbookMobileProviderWebRequestBean extends BaseAddressbookCont
                }
        }
 
-       @Override
-       public void afterAdminAddedMobileProvider (@Observes final AdminAddedMobileProviderEvent event) {
+       /**
+        * Observes events being fired after the administrator has added a new
+        * mobile provider
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterAdminAddedMobileProviderEvent (@Observes final AdminAddedMobileProviderEvent event) {
                // Is all valid?
                if (null == event) {
                        // Throw NPE
index 8fef39db7cca1a19b5981ecfa64663d5c6d4af31..5db40ab2314b60a6ac81ad25d426c8b79d0a21d1 100644 (file)
@@ -18,7 +18,6 @@ package org.mxchange.addressbook.beans.mobileprovider;
 
 import java.io.Serializable;
 import java.util.List;
-import org.mxchange.jphone.events.mobileprovider.added.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
@@ -35,12 +34,4 @@ public interface AddressbookMobileProviderWebRequestController extends Serializa
         */
        List<MobileProvider> allMobileProviders ();
 
-       /**
-        * Observes events being fired after the administrator has added a new
-        * mobile provider
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedMobileProvider (final AdminAddedMobileProviderEvent event);
-
 }
index eadd0df1cddd39d0d683f6f4a673eb15b5fd2b02..b0b38d7809af137a6c904c91ac57ea7164c313e3 100644 (file)
@@ -77,7 +77,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro
        private AddressbookFeaturesWebApplicationController featureController;
 
        /**
-        * Reemote register session bean
+        * Remote register session bean
         */
        private UserRegistrationSessionBeanRemote registerBean;
 
@@ -221,7 +221,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro
                }
 
                // Now only redirect to next page as the JSF does it
-               return "register_page2"; //NOI18N
+               return "user_register_page2"; //NOI18N
        }
 
 }
index 5b097d9e0a52979f9133896d89ae3d1ab1c4caa9..1bd9b687d9ad516d90a1ed240ccc6c124e8c17d8 100644 (file)
@@ -144,12 +144,12 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
        private String userName;
 
        /**
-        * User password (unencrypted from web form)
+        * User password (clear-text from web form)
         */
        private String userPassword;
 
        /**
-        * User password repeated (unencrypted from web form)
+        * User password repeated (clear-text from web form)
         */
        private String userPasswordRepeat;
 
@@ -297,8 +297,12 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                return "admin_list_user"; //NOI18N
        }
 
-       @Override
-       public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
+       /**
+        * Event observer for new user registrations
+        * <p>
+        * @param event User registration event
+        */
+       public void afterUserRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -318,7 +322,6 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                User registeredUser = event.getRegisteredUser();
 
                // @TODO Nothing to do with the user here?
-
                // Clear all data
                this.clear();
        }
index 3ed61f22a50088f5c4a06ecd53c85e2218442532..12a12d4c8dcb539be0e8443affb741931299b73c 100644 (file)
@@ -18,7 +18,6 @@ package org.mxchange.addressbook.beans.user;
 
 import java.io.Serializable;
 import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
 
 /**
  * An interface for user beans
@@ -27,13 +26,6 @@ import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
  */
 public interface AddressbookAdminUserWebRequestController extends Serializable {
 
-       /**
-        * Event observer for new user registrations
-        * <p>
-        * @param event User registration event
-        */
-       void afterRegistrationEvent (final ObservableUserRegisteredEvent event);
-
        /**
         * Adds user instance to database by preparing a complete user instance and
         * sending it to the EJB. The data set in the controller is being verified,
@@ -85,30 +77,30 @@ public interface AddressbookAdminUserWebRequestController extends Serializable {
        void setUserName (final String userName);
 
        /**
-        * Getter for unencrypted user password
+        * Getter for clear-text user password
         * <p>
-        * @return Unencrypted user password
+        * @return Clear-text user password
         */
        String getUserPassword ();
 
        /**
-        * Setter for unencrypted user password
+        * Setter for clear-text user password
         * <p>
-        * @param userPassword Unencrypted user password
+        * @param userPassword Clear-text user password
         */
        void setUserPassword (final String userPassword);
 
        /**
-        * Getter for unencrypted user password repeated
+        * Getter for clear-text user password repeated
         * <p>
-        * @return Unencrypted user password repeated
+        * @return Clear-text user password repeated
         */
        String getUserPasswordRepeat ();
 
        /**
-        * Setter for unencrypted user password repeated
+        * Setter for clear-text user password repeated
         * <p>
-        * @param userPasswordRepeat Unencrypted user password repeated
+        * @param userPasswordRepeat Clear-text user password repeated
         */
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
index 574bb70ccfcc846b5a95fea677d834deab04643e..07d12cf2d6033a6ec059e21481b741c7b16b8b62 100644 (file)
@@ -39,6 +39,13 @@ import org.mxchange.addressbook.beans.localization.AddressbookLocalizationSessio
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
+import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent;
+import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
+import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
+import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
+import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
+import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent;
+import org.mxchange.jusercore.events.user.update.ObservableUpdatedUserPersonalDataEvent;
 import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
 import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
@@ -48,13 +55,6 @@ import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
 import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
-import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent;
-import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
-import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
-import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
-import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent;
-import org.mxchange.jusercore.events.user.update.ObservableUpdatedUserPersonalDataEvent;
 
 /**
  * A user bean (controller)
@@ -132,12 +132,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
        private List<String> userNameList;
 
        /**
-        * User password (unencrypted from web form)
+        * User password (clear-text from web form)
         */
        private String userPassword;
 
        /**
-        * User password repeated (unencrypted from web form)
+        * User password repeated (clear-text from web form)
         */
        private String userPasswordRepeat;
 
@@ -174,7 +174,11 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                }
        }
 
-       @Override
+       /**
+        * Event observer for newly added users by adminstrator
+        * <p>
+        * @param event Event being fired
+        */
        public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterAdminAddedUserEvent: event={0} - CALLED!", event)); //NOI18N
@@ -207,7 +211,11 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterAdminAddedUserEvent: EXIT!"); //NOI18N
        }
 
-       @Override
+       /**
+        * Event observer for updated user data by administrator
+        * <p>
+        * @param event Event being updated
+        */
        public void afterAdminUpdatedUserDataEvent (@Observes final ObservableAdminUpdatedUserDataEvent event) {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterAdminUpdatedUserEvent: event={0} - CALLED!", event)); //NOI18N
@@ -237,11 +245,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterAdminUpdatedUserEvent: EXIT!"); //NOI18N
        }
 
-       @Override
-       public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
-               // Trace message
-               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N
-
+       /**
+        * Event observer for new user registrations
+        * <p>
+        * @param event User registration event
+        */
+       public void afterUserRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -288,11 +297,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
        }
 
-       @Override
-       public void afterUserConfirmedAccount (@Observes final ObservableUserConfirmedAccountEvent event) {
-               // Trace message
-               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
-
+       /**
+        * Event observer when user confirmed account.
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterUserConfirmedAccountEvent (@Observes final ObservableUserConfirmedAccountEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -312,7 +322,11 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                this.uniqueAddUser(event.getConfirmedUser());
        }
 
-       @Override
+       /**
+        * Event observer for logged-in user
+        * <p>
+        * @param event Event instance
+        */
        public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) {
                // Trace message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
@@ -345,7 +359,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                }
        }
 
-       @Override
+       /**
+        * Method being call after user's password has been updated (and history
+        * entry has been created).
+        * <p>
+        * @param event Event being observed
+        */
        public void afterUserUpdatedPasswordEvent (@Observes final ObservableUpdatedUserPasswordEvent event) {
                // Check parameter
                if (null == event) {
@@ -366,8 +385,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                this.updateList(event.getPasswordHistory().getUserPasswordHistoryUser());
        }
 
-       @Override
-       public void afterUserUpdatedPersonalData (@Observes final ObservableUpdatedUserPersonalDataEvent event) {
+       /**
+        * Listens to fired event when user updated personal data
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterUserUpdatedPersonalDataEvent (@Observes final ObservableUpdatedUserPersonalDataEvent event) {
                // Check parameter
                if (null == event) {
                        // Throw NPE
@@ -413,7 +436,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                User user = new LoginUser();
 
                // Is user name required?
-               if (!this.isUserNameRequired()) {
+               if ((!this.featureController.isFeatureEnabled("user_name_required")) && (this.getUserName() == null)) { //NOI18N
                        // Generate pseudo-random user name
                        String randomName = this.userBean.generateRandomUserName();
 
@@ -492,7 +515,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
                        throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
-               } else if (!this.featureController.isFeatureEnabled("edit_user_data")) {
+               } else if (!this.featureController.isFeatureEnabled("edit_user_data")) { //NOI18N
                        // Editing is not allowed
                        throw new IllegalStateException("User tried to edit personal data."); //NOI18N
                }
@@ -504,12 +527,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                this.contactController.updateContactDataFromController(user.getUserContact());
 
                // It should be there, so run some tests on it
-               assert (user instanceof User) : "Instance userLoginController.loggedInUser is null";
-               assert (user.getUserId() instanceof Long) : "Instance userLoginController.loggedInUser.userId is null";
-               assert (user.getUserId() > 0) : MessageFormat.format("userLoginController.loggedInUser.userId={0} is invalid", user.getUserId());
-               assert (user.getUserContact() instanceof Contact) : "Instance userLoginController.loggedInUser.userContact is null";
-               assert (user.getUserContact().getContactId() instanceof Long) : "Instance userLoginController.userContact.contactId is null";
-               assert (user.getUserContact().getContactId() > 0) : MessageFormat.format("Instance userLoginController.userContact.contactId={0} is invalid", user.getUserContact().getContactId());
+               assert (user instanceof User) : "Instance userLoginController.loggedInUser is null"; //NOI18N
+               assert (user.getUserId() instanceof Long) : "Instance userLoginController.loggedInUser.userId is null"; //NOI18N
+               assert (user.getUserId() > 0) : MessageFormat.format("userLoginController.loggedInUser.userId={0} is invalid", user.getUserId()); //NOI18N
+               assert (user.getUserContact() instanceof Contact) : "Instance userLoginController.loggedInUser.userContact is null"; //NOI18N
+               assert (user.getUserContact().getContactId() instanceof Long) : "Instance userLoginController.userContact.contactId is null"; //NOI18N
+               assert (user.getUserContact().getContactId() > 0) : MessageFormat.format("Instance userLoginController.userContact.contactId={0} is invalid", user.getUserContact().getContactId()); //NOI18N
 
                // Update all fields
                user.setUserProfileMode(this.getUserProfileMode());
@@ -641,7 +664,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
 
                // This requires user names being enabled, too.
-               if ((isEnabled) && (!this.isUserNameRequired())) {
+               if ((isEnabled) && (!this.featureController.isFeatureEnabled("user_name_required"))) { //NOI18N
                        // Not valid state, users must be able to modify their profile, especially when it is public
                        throw new IllegalStateException("Public user profiles are enabled but user name requirement is disabled, this is not possible."); //NOI18N
                }
@@ -664,7 +687,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                        return this.contactController.isRequiredPersonalDataSet();
                } else {
                        // Single registration page
-                       return (((this.getUserName() != null) || (!this.isUserNameRequired())) &&
+                       return (((this.getUserName() != null) || (!this.featureController.isFeatureEnabled("user_name_required"))) && //NOI18N
                                        (this.getUserProfileMode() != null) &&
                                        (this.contactController.isRequiredPersonalDataSet()) &&
                                        (this.getUserPassword() != null) &&
@@ -687,18 +710,6 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp
                return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName())));
        }
 
-       @Override
-       public boolean isUserNameRequired () {
-               // Get context parameter
-               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_user_name_required"); //NOI18N
-
-               // Is it set?
-               boolean isRequired = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
-
-               // Return value
-               return isRequired;
-       }
-
        @Override
        public boolean isVisibleUserFound () {
                return ((this.visibleUserList instanceof List) && (!this.visibleUserList.isEmpty()));
index 76bfc7a679af24498a1cbd9b9de97315bc8f55f9..3ba716278e2e8fccbc770994c889f2d3afb99b94 100644 (file)
@@ -23,13 +23,6 @@ import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
-import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent;
-import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent;
-import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
-import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
-import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
-import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent;
-import org.mxchange.jusercore.events.user.update.ObservableUpdatedUserPersonalDataEvent;
 
 /**
  * An interface for user beans
@@ -43,56 +36,6 @@ public interface AddressbookUserWebSessionController extends Serializable {
         */
        public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
 
-       /**
-        * Event observer for newly added users by adminstrator
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event);
-
-       /**
-        * Event observer for updated user data by administrator
-        * <p>
-        * @param event Event being updated
-        */
-       void afterAdminUpdatedUserDataEvent (final ObservableAdminUpdatedUserDataEvent event);
-
-       /**
-        * Event observer when user confirmed account.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterUserConfirmedAccount (final ObservableUserConfirmedAccountEvent event);
-
-       /**
-        * Method being call after user's password has been updated (and history
-        * entry has been created).
-        * <p>
-        * @param event Event being observed
-        */
-       void afterUserUpdatedPasswordEvent (final ObservableUpdatedUserPasswordEvent event);
-
-       /**
-        * Listens to fired event when user updated personal data
-        * <p>
-        * @param event Event being fired
-        */
-       void afterUserUpdatedPersonalData (final ObservableUpdatedUserPersonalDataEvent event);
-
-       /**
-        * Event observer for new user registrations
-        * <p>
-        * @param event User registration event
-        */
-       void afterRegistrationEvent (final ObservableUserRegisteredEvent event);
-
-       /**
-        * Event observer for logged-in user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLoginEvent (final ObservableUserLoggedInEvent event);
-
        /**
         * All users
         * <p>
@@ -202,30 +145,30 @@ public interface AddressbookUserWebSessionController extends Serializable {
        void setUserName (final String userName);
 
        /**
-        * Getter for unencrypted user password
+        * Getter for clear-text user password
         * <p>
-        * @return Unencrypted user password
+        * @return Clear-text user password
         */
        String getUserPassword ();
 
        /**
-        * Setter for unencrypted user password
+        * Setter for clear-text user password
         * <p>
-        * @param userPassword Unencrypted user password
+        * @param userPassword Clear-text user password
         */
        void setUserPassword (final String userPassword);
 
        /**
-        * Getter for unencrypted user password repeated
+        * Getter for clear-text user password repeated
         * <p>
-        * @return Unencrypted user password repeated
+        * @return Clear-text user password repeated
         */
        String getUserPasswordRepeat ();
 
        /**
-        * Setter for unencrypted user password repeated
+        * Setter for clear-text user password repeated
         * <p>
-        * @param userPasswordRepeat Unencrypted user password repeated
+        * @param userPasswordRepeat Clear-text user password repeated
         */
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
@@ -279,14 +222,6 @@ public interface AddressbookUserWebSessionController extends Serializable {
         */
        String doChangePersonalData ();
 
-       /**
-        * Checks whether this application requires a user name to be entered.
-        * Otherwise a random name like "userXXXXX" is generated
-        * <p>
-        * @return Whether this application requires a user name
-        */
-       boolean isUserNameRequired ();
-
        /**
         * Checks wether public user profiles are enabled. This requires that user
         * names are also enabled.
index 4463dbba7dca7d3a5ffc206a89fa2531f9e362f5..04f61277a4e9cc87db46fe25c5c9ef79b2b6cba1 100644 (file)
@@ -78,12 +78,12 @@ public class AddressbookUserPasswordWebRequestBean extends BaseAddressbookContro
        private AddressbookUserLoginWebSessionController userLoginController;
 
        /**
-        * User password (unencrypted from web form)
+        * User password (clear-text from web form)
         */
        private String userPassword;
 
        /**
-        * User password repeated (unencrypted from web form)
+        * User password repeated (clear-text from web form)
         */
        private String userPasswordRepeat;
 
index b53e7d99f193163aff106757967244b76ee1b167..01fc52a5ce1ae185457dd926bf55ad19d42944a6 100644 (file)
@@ -28,44 +28,44 @@ import javax.ejb.Local;
 public interface AddressbookUserPasswordWebRequestController extends Serializable {
 
        /**
-        * Getter for unencrypted user password
+        * Getter for clear-text user password
         * <p>
-        * @return Unencrypted user password
+        * @return Clear-text user password
         */
        String getUserPassword ();
 
        /**
-        * Setter for unencrypted user password
+        * Setter for clear-text user password
         * <p>
-        * @param userPassword Unencrypted user password
+        * @param userPassword Clear-text user password
         */
        void setUserPassword (final String userPassword);
 
        /**
-        * Getter for current unencrypted user password
+        * Getter for current clear-text user password
         * <p>
-        * @return Current unencrypted user password
+        * @return Current clear-text user password
         */
        String getUserCurrentPassword ();
 
        /**
-        * Setter for current unencrypted user password
+        * Setter for current clear-text user password
         * <p>
-        * @param userCurrentPassword Current unencrypted user password
+        * @param userCurrentPassword Current clear-text user password
         */
        void setUserCurrentPassword (final String userCurrentPassword);
 
        /**
-        * Getter for unencrypted user password repeated
+        * Getter for clear-text user password repeated
         * <p>
-        * @return Unencrypted user password repeated
+        * @return Clear-text user password repeated
         */
        String getUserPasswordRepeat ();
 
        /**
-        * Setter for unencrypted user password repeated
+        * Setter for clear-text user password repeated
         * <p>
-        * @param userPasswordRepeat Unencrypted user password repeated
+        * @param userPasswordRepeat Clear-text user password repeated
         */
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
index 10e4d50955161d9537dc93de044a4a9fff75886f..f9576c052a6ba83c7219fcf43b8ee025b15d0db7 100644 (file)
@@ -62,9 +62,6 @@ public class AddressbookCellphoneConverter implements Converter {
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -75,20 +72,14 @@ public class AddressbookCellphoneConverter implements Converter {
                }
 
                // Init instance
-               DialableMobileNumber cellphone = null;
+               DialableMobileNumber mobile = null;
 
                try {
                        // Try to parse the value as long
-                       Long cellphoneId = Long.valueOf(submittedValue);
-
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: userId{0}", userId)); //NOI18N
+                       Long mobileId = Long.valueOf(submittedValue);
 
-                       // Try to get cellphone instance from it
-                       cellphone = this.phoneBean.findMobileNumberById(cellphoneId);
-
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: cellphone={0}", cellphone)); //NOI18N
+                       // Try to get mobile instance from it
+                       mobile = this.phoneBean.findMobileNumberById(mobileId);
                } catch (final NumberFormatException ex) {
                        // Throw again
                        throw new ConverterException(ex);
@@ -97,11 +88,8 @@ public class AddressbookCellphoneConverter implements Converter {
                        // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
                }
 
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: cellphone={0} - EXIT!", cellphone)); //NOI18N
-
                // Return it
-               return cellphone;
+               return mobile;
        }
 
        @Override
index 06b4d10d16701d437646044ec5ed377af8a6dba1..ccf23f591b2229cbcfb8510e60ec89e19c102e95 100644 (file)
@@ -61,9 +61,6 @@ public class AddressbookContactConverter implements Converter {
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -80,14 +77,8 @@ public class AddressbookContactConverter implements Converter {
                        // Try to parse the value as long
                        Long contactId = Long.valueOf(submittedValue);
 
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: contactId{0}", contactId)); //NOI18N
-
                        // Try to get user instance from it
                        contact = this.contactBean.findContactById(contactId);
-
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: contact={0}", contact)); //NOI18N
                } catch (final NumberFormatException ex) {
                        // Throw again
                        throw new ConverterException(ex);
@@ -96,9 +87,6 @@ public class AddressbookContactConverter implements Converter {
                        // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("{0}.getAsObject(): Exception: {1} - Returning null ...", this.getClass().getSimpleName(), ex)); //NOI18N
                }
 
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: contact={0} - EXIT!", contact)); //NOI18N
-
                // Return it
                return contact;
        }
index c96fd7daabece7d856501a93c2e667b886c67e55..89b9f4e8d13575ed36ae4a5e5be4f24e116edf29 100644 (file)
@@ -62,9 +62,6 @@ public class AddressbookCountryConverter implements Converter {
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2},this.countryBean={3} - CALLED!", context, component, submittedValue, this.countryBean)); //NOI18N
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -88,9 +85,6 @@ public class AddressbookCountryConverter implements Converter {
                        // Category id should not be below 1
                        assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N
 
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: countryId={0}", countryId)); //NOI18N
-
                        // Try to find it
                        for (final Country cntry : countryList) {
                                // Is the id the same? (null-safe)
@@ -105,9 +99,6 @@ public class AddressbookCountryConverter implements Converter {
                        throw new ConverterException(ex);
                }
 
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: country={0} - EXIT!", country)); //NOI18N
-
                // Return it
                return country;
        }
index 1695e7a3a5d094853370e30b9805e42dbc99d590..2f27fef24b3e28e2e2e56adcefefea2eb1effeec 100644 (file)
@@ -62,9 +62,6 @@ public class AddressbookMobileProviderConverter implements Converter {
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -88,9 +85,6 @@ public class AddressbookMobileProviderConverter implements Converter {
                        // Category id should not be below 1
                        assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
 
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: providerId={0}", providerId)); //NOI18N
-
                        // Try to find it
                        for (final MobileProvider prov : providerList) {
                                // Is the id the same? (null-safe)
@@ -105,9 +99,6 @@ public class AddressbookMobileProviderConverter implements Converter {
                        // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logException(ex);
                }
 
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: provider={0} - EXIT!", provider)); //NOI18N
-
                // Return it
                return provider;
        }
index 732f8ff77fc5ebe1cae44d14acf52c73f81adcba..33f0b35058394634487821b9f9b5b0e8ef11f060 100644 (file)
@@ -61,9 +61,6 @@ public class AddressbookUserConverter implements Converter {
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -80,14 +77,8 @@ public class AddressbookUserConverter implements Converter {
                        // Try to parse the value as long
                        Long userId = Long.valueOf(submittedValue);
 
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: userId{0}", userId)); //NOI18N
-
                        // Try to get user instance from it
                        user = this.userBean.findUserById(userId);
-
-                       // Debug message
-                       // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: user={0}", user)); //NOI18N
                } catch (final NumberFormatException ex) {
                        // Throw again
                        throw new ConverterException(ex);
@@ -96,9 +87,6 @@ public class AddressbookUserConverter implements Converter {
                        // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N
                }
 
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: user={0} - EXIT!", user)); //NOI18N
-
                // Return it
                return user;
        }
index 896bef50c69e658b8f5be3833c567bbb19f6a6a5..a2a0d5a0999287eee811fdad7d71efaa063c3d93 100644 (file)
@@ -58,9 +58,6 @@ public class AddressbookBirthdayValidator extends BaseDateValidator implements V
 
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
-
                // All accepted, required fields
                String[] requiredFields = {"birthday", "contactBirthday"}; //NOI18N
 
@@ -71,8 +68,6 @@ public class AddressbookBirthdayValidator extends BaseDateValidator implements V
                Date birthday = (Date) value;
 
                // @TODO Finish this, e.g. load maximum,minimum birthday from properties file
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace("validate: EXIT!"); //NOI18N
        }
 
 }
index 2bad960678aaa20db7bf251b52282292126a3918..e35ad92bfa2cdf3df683d9c2e41f8418f1077960 100644 (file)
@@ -80,10 +80,7 @@ public class AddressbookUserIdValidator extends BaseLongValidator implements Val
         * <p>
         * @param event User registration event
         */
-       public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("UserIdValidator:afterRegistrationEvent: event={0} - CALLED!", event)); //NOI18N
-
+       public void afterUserRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) {
                // event should not be null
                if (null == event) {
                        // Throw NPE
@@ -102,21 +99,12 @@ public class AddressbookUserIdValidator extends BaseLongValidator implements Val
                // Get user instance
                User registeredUser = event.getRegisteredUser();
 
-               // Debug message
-               // NOISY-DEBUG: this.loggerBeanLocal.logDebug(MessageFormat.format("UserIdValidator:afterRegistrationEvent: registeredUser={0}", registeredUser)); //NOI18N
-
                // Update cache
                AddressbookUserIdValidator.cachedStatus.add(registeredUser.getUserId());
-
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace("UserIdValidator:afterRegistrationEvent: EXIT!"); //NOI18N
        }
 
        @Override
        public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException {
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
-
                // All accepted, required fields
                String[] requiredFields = {"userId"}; //NOI18N
 
@@ -146,9 +134,6 @@ public class AddressbookUserIdValidator extends BaseLongValidator implements Val
 
                // Add to cache if valid
                AddressbookUserIdValidator.cachedStatus.add(userId);
-
-               // Trace message
-               // NOISY-DEBUG: this.loggerBeanLocal.logTrace("validate: EXIT!"); //NOI18N
        }
 
 }