From: Roland Häder Date: Thu, 20 Apr 2017 09:59:03 +0000 (+0200) Subject: renamed methods X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=376f782ff7a77e53533252d289d52543e4fc017f;p=pizzaservice-war.git renamed methods Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java index 6bf6a167..0be55879 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java @@ -408,7 +408,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterUserLogin (@Observes final ObservableUserLoggedInEvent event) { + public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) { // event should not be null if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java index d91eccb9..694c502a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java @@ -121,7 +121,7 @@ public interface PizzaContactWebSessionController extends Serializable { *

* @param event Event instance */ - void afterUserLogin (final ObservableUserLoggedInEvent event); + void afterUserLoginEvent (final ObservableUserLoggedInEvent event); /** * Creates an instance from all properties diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index 7b917eec..af5234d4 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -23,9 +23,9 @@ import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Observes; import javax.faces.context.FacesContext; import javax.inject.Named; -import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent; +import org.mxchange.pizzaapplication.beans.BasePizzaController; /** * A session bean for handling localization/internationalization changes. This @@ -50,7 +50,7 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements private Locale locale; @Override - public void afterUserLogin (@Observes final ObservableUserLoggedInEvent event) { + public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("LandingLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N @@ -69,15 +69,18 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedInUser(), event.getLoggedInUser().getUserId())); //NOI18N } - // Set locale here - this.setLocale(event.getLoggedInUser().getUserLocale()); + // Is the locale set? + if (event.getLoggedInUser().getUserLocale() instanceof Locale) { + // Set locale here + this.setLocale(event.getLoggedInUser().getUserLocale()); + } // Trace message //* NOISY-DEBUG: */ System.out.println("LandingLocalizationSessionBean:afterUserLogin - EXIT!"); //NOI18N } @Override - public void afterUserLogout (@Observes final ObservableUserLogoutEvent event) { + public void afterUserLogoutEvent (@Observes final ObservableUserLogoutEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ReportsLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java index ef48b941..60831384 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java @@ -33,14 +33,14 @@ public interface PizzaLocalizationSessionController extends Serializable { *

* @param event Event instance */ - void afterUserLogin (final ObservableUserLoggedInEvent event); + void afterUserLoginEvent (final ObservableUserLoggedInEvent event); /** * Event observer for logged-out user *

* @param event Event instance */ - void afterUserLogout (final ObservableUserLogoutEvent event); + void afterUserLogoutEvent (final ObservableUserLogoutEvent event); /** * Getter for locale diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java index dbe0972d..d5df16c5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java @@ -313,7 +313,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterUserLogin (@Observes final ObservableUserLoggedInEvent event) { + public void afterUserLoginEvent (@Observes final ObservableUserLoggedInEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java index 3ab7657a..1e09ec69 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java @@ -91,7 +91,7 @@ public interface PizzaUserWebSessionController extends Serializable { *

* @param event Event instance */ - void afterUserLogin (final ObservableUserLoggedInEvent event); + void afterUserLoginEvent (final ObservableUserLoggedInEvent event); /** * All users diff --git a/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java b/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java index 7424f8d8..a0b7676e 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/names/PizzaNameValidator.java @@ -45,7 +45,7 @@ public class PizzaNameValidator extends BaseStringValidator implements Validator String[] requiredFields = {"firstName", "familyName", "city", "street"}; //NOI18N // Pre-validation (example: not null, not a string, empty string ...) - super.preValidate(context, component, value, requiredFields, true); + super.preValidate(context, component, value, requiredFields, false); // Trace message //* NOISY-DEBUG: */ System.out.println("validate: EXIT!"); //NOI18N