From 9f07a3276a1f7951fbddd3e675f1194ee0677ed5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 20 Apr 2017 11:29:15 +0200 Subject: [PATCH] Please cherry-pick: - let's get rid of all these debug messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../beans/BasePizzaController.java | 4 --- .../beans/helper/PizzaWebRequestHelper.java | 12 ------- .../PizzaLocalizationSessionBean.java | 33 ------------------- .../user/PizzaAdminUserWebRequestBean.java | 17 +++------- .../PizzaEmailAddressValidator.java | 6 ---- .../validator/names/PizzaNameValidator.java | 7 +--- .../password/PizzaUserPasswordValidator.java | 6 ---- .../PizzaPrivacyTermsCheckboxValidator.java | 6 ---- 8 files changed, 6 insertions(+), 85 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java index d13f580e..93f367c1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/BasePizzaController.java @@ -17,7 +17,6 @@ package org.mxchange.pizzaapplication.beans; import java.io.Serializable; -import java.text.MessageFormat; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; @@ -109,9 +108,6 @@ public abstract class BasePizzaController implements Serializable { * @param cause Causing exception */ protected void showFacesMessage (final String clientId, final Throwable cause) { - // Trace message - System.out.println(MessageFormat.format("showFacesMessage: clientId={0},cause={1} - CALLED!", clientId, cause)); - // Get context and add message this.showFacesMessage(clientId, cause.getMessage()); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java index f2857f9a..82fd2019 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java +++ b/src/java/org/mxchange/pizzaapplication/beans/helper/PizzaWebRequestHelper.java @@ -99,9 +99,6 @@ public class PizzaWebRequestHelper implements PizzaWebRequestController { @Override public void copyContactToController () { - // Log message - //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N - // Validate user instance if (this.getContact() == null) { // Throw NPE @@ -119,9 +116,6 @@ public class PizzaWebRequestHelper implements PizzaWebRequestController { // Set all fields: user this.adminContactController.copyContactToController(this.getContact()); - - // Log message - //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - EXIT!"); //NOI18N } @Override @@ -150,9 +144,6 @@ public class PizzaWebRequestHelper implements PizzaWebRequestController { @Override public void copyUserToController () { - // Log message - //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - CALLED!"); //NOI18N - // Validate user instance if (this.getUser() == null) { // Throw NPE @@ -176,9 +167,6 @@ public class PizzaWebRequestHelper implements PizzaWebRequestController { // Set all fields: user this.userController.setUserName(this.getUser().getUserName()); - - // Log message - //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N } @Override diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index af5234d4..0d17007c 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -51,9 +51,6 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements @Override public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("LandingLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N - // event should not be null if (null == event) { // Throw NPE @@ -74,16 +71,10 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements // Set locale here this.setLocale(event.getLoggedInUser().getUserLocale()); } - - // Trace message - //* NOISY-DEBUG: */ System.out.println("LandingLocalizationSessionBean:afterUserLogin - EXIT!"); //NOI18N } @Override public void afterUserLogoutEvent (@Observes final ObservableUserLogoutEvent event) { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ReportsLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N - // event should not be null if (null == event) { // Throw NPE @@ -101,22 +92,15 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements // Clear this bean as well this.clear(); - - // Trace message - //* NOISY-DEBUG: */ System.out.println("ReportsLocalizationSessionBean:afterUserLogin - EXIT!"); //NOI18N } @Override public String getLanguage () { - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::getLanguage(): locale.language={0} - EXIT!", this.getLocale().getLanguage())); //NOI18N return this.getLocale().getLanguage().toLowerCase(); } @Override public void setLanguage (final String language) { - // Log trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N - // Is the language null? if (null == language) { // This may sometimes happen, so abort here @@ -132,26 +116,18 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements // Get new locale with upper-case country code Locale loc = new Locale(splits[0], splits[1]); - // Log debug message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::setLanguage: loc={0}", loc)); //NOI18N - // Set it here and in the JSF context this.setLocale(loc); FacesContext.getCurrentInstance().getViewRoot().setLocale(loc); - - // Log trace message - //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::setLanguage: EXIT!"); //NOI18N } @Override public Locale getLocale () { - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::getLocale(): locale={0} - EXIT!", this.locale)); //NOI18N return this.locale; } @Override public void setLocale (final Locale locale) { - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::setLocale(): locale={0} - CALLED!", locale)); //NOI18N this.locale = locale; } @@ -169,20 +145,11 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements */ @PostConstruct public void init () { - // Log trace message - //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::init: CALLED!"); //NOI18N - // Create locale instance from context Locale loc = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); - // Log debug message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::init: loc={0}", loc)); //NOI18N - // Set it here this.setLocale(loc); - - // Log trace message - //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::init: EXIT!"); //NOI18N } /** diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index b023d175..30a3ca99 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -32,9 +32,13 @@ import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jusercore.container.login.UserLoginContainer; +import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; +import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent; +import org.mxchange.jusercore.events.user.linked.ObservableAdminLinkedUserEvent; import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent; +import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -53,10 +57,6 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController; import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController; import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController; -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.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent; /** * Administrative user bean (controller) @@ -299,9 +299,6 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements @Override public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminUserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N - // event should not be null if (null == event) { // Throw NPE @@ -320,14 +317,10 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements // Get user instance User registeredUser = event.getRegisteredUser(); - // Debug message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N + // @TODO Nothing to do with the user here? // Clear all data this.clear(); - - // Trace message - //* NOISY-DEBUG: */ System.out.println("AdminUserWebBean:afterRegistration: EXIT!"); //NOI18N } @Override diff --git a/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java b/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java index e3ce71a6..8e2e1187 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/emailaddress/PizzaEmailAddressValidator.java @@ -68,9 +68,6 @@ public class PizzaEmailAddressValidator extends BaseStringValidator implements V @Override public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N - // The required field String[] requiredFields = {"emailAddress", "emailAddressRepeat", "resendEmailAddress"}; //NOI18N @@ -111,9 +108,6 @@ public class PizzaEmailAddressValidator extends BaseStringValidator implements V // No, then abort here throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_INFO, message, message)); } - - // Trace message - //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N } } diff --git a/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java b/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java index a0b7676e..837d7bb6 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java @@ -38,16 +38,11 @@ public class PizzaNameValidator extends BaseStringValidator implements Validator @Override public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N - // All accepted, required fields String[] requiredFields = {"firstName", "familyName", "city", "street"}; //NOI18N // Pre-validation (example: not null, not a string, empty string ...) super.preValidate(context, component, value, requiredFields, false); - - // Trace message - //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N } + } diff --git a/src/java/org/mxchange/pizzaapplication/validator/password/PizzaUserPasswordValidator.java b/src/java/org/mxchange/pizzaapplication/validator/password/PizzaUserPasswordValidator.java index 8756a157..ed315e46 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/password/PizzaUserPasswordValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/password/PizzaUserPasswordValidator.java @@ -56,9 +56,6 @@ public class PizzaUserPasswordValidator extends BaseStringValidator 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 - // The required field String[] requiredFields = {"currentPassword"}; //NOI18N @@ -76,9 +73,6 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N } */ - - // Trace message - // NOISY-DEBUG: this.loggerBeanLocal.logTrace("validate: EXIT!"); //NOI18N } } diff --git a/src/java/org/mxchange/pizzaapplication/validator/privacy_terms/PizzaPrivacyTermsCheckboxValidator.java b/src/java/org/mxchange/pizzaapplication/validator/privacy_terms/PizzaPrivacyTermsCheckboxValidator.java index 5ad11b8e..d402fc25 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/privacy_terms/PizzaPrivacyTermsCheckboxValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/privacy_terms/PizzaPrivacyTermsCheckboxValidator.java @@ -38,16 +38,10 @@ public class PizzaPrivacyTermsCheckboxValidator extends BaseBooleanValidator imp @Override public void validate (final FacesContext context, final UIComponent component, final Object value) throws ValidatorException { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N - // All accepted, required fields String[] requiredFields = {"privacy", "terms"}; //NOI18N // Pre-validation (example: not null, not a string, empty string ...) super.preValidate(context, component, value, requiredFields, false); - - // Trace message - //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N } } -- 2.39.5