From b05e2cf9f06bd3aedbde7a9e968ebc00e94852bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 20 Apr 2017 00:56:52 +0200 Subject: [PATCH] renamed to better names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../PizzaConfirmationLinkWebRequestBean.java | 6 ++-- .../PizzaAdminContactWebRequestBean.java | 12 +++---- .../contact/PizzaContactWebSessionBean.java | 28 ++++++++-------- .../PizzaContactWebSessionController.java | 28 ++++++++-------- .../PizzaContactPhoneWebSessionBean.java | 12 +++---- ...PizzaContactPhoneWebSessionController.java | 12 +++---- .../PizzaAdminCountryWebRequestBean.java | 6 ++-- .../PizzaCountryWebApplicationBean.java | 4 +-- .../PizzaCountryWebApplicationController.java | 4 +-- .../PizzaAdminCustomerWebRequestBean.java | 6 ++-- .../customer/PizzaCustomerWebSessionBean.java | 8 ++--- .../PizzaCustomerWebSessionController.java | 8 ++--- .../PizzaLocalizationSessionBean.java | 8 ++--- .../PizzaLocalizationSessionController.java | 8 ++--- .../login/PizzaUserLoginWebSessionBean.java | 14 ++++---- .../PizzaUserLoginWebSessionController.java | 4 +-- .../PizzaUserRegisterWebSessionBean.java | 6 ++-- .../PizzaResendLinkWebSessionBean.java | 6 ++-- .../user/PizzaAdminUserWebRequestBean.java | 22 ++++++------- .../PizzaAdminUserWebRequestController.java | 4 +-- .../beans/user/PizzaUserWebSessionBean.java | 32 +++++++++---------- .../user/PizzaUserWebSessionController.java | 28 ++++++++-------- .../PizzaUserPasswordWebRequestBean.java | 6 ++-- .../validator/user/PizzaUserIdValidator.java | 4 +-- 24 files changed, 138 insertions(+), 138 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java index 16d88738..614c3053 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/confirmlink/PizzaConfirmationLinkWebRequestBean.java @@ -30,7 +30,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.confirmation.ConfirmedUserAccountEvent; import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; @@ -40,6 +39,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; /** * A web request bean for confirmation link handling @@ -82,7 +82,7 @@ public class PizzaConfirmationLinkWebRequestBean extends BasePizzaController imp */ @Inject @Any - private Event userConfirmedEvent; + private Event userConfirmedEvent; /** * Default constructor @@ -203,7 +203,7 @@ public class PizzaConfirmationLinkWebRequestBean extends BasePizzaController imp } // Fire event that the user has confirmed account - this.userConfirmedEvent.fire(new ConfirmedUserAccountEvent(updatedUser)); + this.userConfirmedEvent.fire(new UserConfirmedAccountEvent(updatedUser)); // Set it again in helper this.beanHelper.setUser(updatedUser); diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java index 46c993df..339e8ef1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java @@ -37,8 +37,6 @@ import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.contact.utils.ContactUtils; import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcontacts.events.contact.add.AdminContactAddedEvent; -import org.mxchange.jcontacts.events.contact.update.AdminContactUpdatedEvent; import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcountry.data.Country; @@ -52,6 +50,8 @@ import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController; +import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; +import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent; /** * Administrative user bean (controller) @@ -72,7 +72,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme */ @Inject @Any - private Event addedContactEvent; + private Event addedContactEvent; /** * Administrative contact EJB @@ -236,7 +236,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme */ @Inject @Any - private Event updatedContactEvent; + private Event updatedContactEvent; /** * ZIP code @@ -305,7 +305,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme } // Fire event - this.addedContactEvent.fire(new AdminContactAddedEvent(updatedContact)); + this.addedContactEvent.fire(new AdminAddedContactEvent(updatedContact)); // Clear this bean this.clear(); @@ -504,7 +504,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme Contact updatedContact = this.contactBean.updateContactData(contact, this.isCellphoneUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked); // Fire event - this.updatedContactEvent.fire(new AdminContactUpdatedEvent(updatedContact)); + this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact)); // Clear bean this.clear(); diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java index 6aa841ad..6bf6a167 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java @@ -37,8 +37,6 @@ import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.contact.utils.ContactUtils; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; import org.mxchange.jcontacts.exceptions.ContactNotFoundException; import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; @@ -48,16 +46,18 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; -import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; -import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.user.User; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +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; /** * A general contact bean (controller) @@ -252,7 +252,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) { + public void afterAdminAddedContact (@Observes final ObservableAdminAddedContactEvent event) { // Trace message /* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedContact(): event={0} - CALLED!", event)); //NOI18N @@ -282,7 +282,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) { + public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -303,7 +303,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterAdminLinkedUser (@Observes final AdminLinkedUserEvent event) { + public void afterAdminLinkedUser (@Observes final ObservableAdminLinkedUserEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -330,7 +330,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterAdminUpdatedContactDataEvent (@Observes final AdminUpdatedContactEvent event) { + public void afterAdminUpdatedContactDataEvent (@Observes final ObservableAdminUpdatedContactEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -354,7 +354,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -387,7 +387,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) { + public void afterUserConfirmedAccount (@Observes final ObservableUserConfirmedAccountEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -408,7 +408,7 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P } @Override - public void afterUserLogin (@Observes final UserLoggedInEvent event) { + public void afterUserLogin (@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 02aae246..d91eccb9 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java @@ -22,16 +22,16 @@ import java.util.List; import javax.ejb.Local; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.gender.Gender; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; 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.UserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; -import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent; +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 @@ -58,14 +58,14 @@ public interface PizzaContactWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedUserEvent (final AdminAddedUserEvent event); + void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event); /** * Event observer when user confirmed account. *

* @param event Event being fired */ - void afterUserConfirmedAccount (final UserConfirmedAccountEvent event); + void afterUserConfirmedAccount (final ObservableUserConfirmedAccountEvent event); /** * Updates all data from bean in given contact instance @@ -91,7 +91,7 @@ public interface PizzaContactWebSessionController extends Serializable { *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterRegistrationEvent (final ObservableUserRegisteredEvent event); /** * Observes events being fired when an administrator has added a new @@ -99,7 +99,7 @@ public interface PizzaContactWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedContact (final AdminAddedContactEvent event); + void afterAdminAddedContact (final ObservableAdminAddedContactEvent event); /** * Observes events being fired when an administrator has linked a new user @@ -107,21 +107,21 @@ public interface PizzaContactWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminLinkedUser (final AdminLinkedUserEvent event); + void afterAdminLinkedUser (final ObservableAdminLinkedUserEvent event); /** * Event observer for updated contact data by administrators *

* @param event Updated contact data event */ - void afterAdminUpdatedContactDataEvent (final AdminUpdatedContactEvent event); + void afterAdminUpdatedContactDataEvent (final ObservableAdminUpdatedContactEvent event); /** * Event observer for logged-in user *

* @param event Event instance */ - void afterUserLogin (final UserLoggedInEvent event); + void afterUserLogin (final ObservableUserLoggedInEvent event); /** * Creates an instance from all properties diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java index 159d7cbe..ac4ab7c3 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java @@ -31,13 +31,13 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController; import org.mxchange.pizzaapplication.beans.phone.PizzaAdminPhoneWebRequestController; +import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; +import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; +import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent; /** * A general contact bean (controller) @@ -97,7 +97,7 @@ public class PizzaContactPhoneWebSessionBean extends BasePizzaController impleme } @Override - public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) { + public void afterAdminAddedContact (@Observes final ObservableAdminAddedContactEvent event) { // The event must be valid if (null == event) { // Throw NPE @@ -118,7 +118,7 @@ public class PizzaContactPhoneWebSessionBean extends BasePizzaController impleme } @Override - public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) { + public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) { // event should not be null if (null == event) { // Throw NPE @@ -139,7 +139,7 @@ public class PizzaContactPhoneWebSessionBean extends BasePizzaController impleme } @Override - public void afterAdminUpdatedContactDataEvent (@Observes final AdminUpdatedContactEvent event) { + public void afterAdminUpdatedContactDataEvent (@Observes final ObservableAdminUpdatedContactEvent event) { // event should not be null if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionController.java index 58c69532..72c59e85 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionController.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.util.List; import javax.ejb.Local; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; +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 @@ -49,7 +49,7 @@ public interface PizzaContactPhoneWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedUserEvent (final AdminAddedUserEvent event); + void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event); /** * Observes events being fired when an administrator has added a new @@ -57,13 +57,13 @@ public interface PizzaContactPhoneWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedContact (final AdminAddedContactEvent event); + void afterAdminAddedContact (final ObservableAdminAddedContactEvent event); /** * Event observer for updated contact data by administrators *

* @param event Updated contact data event */ - void afterAdminUpdatedContactDataEvent (final AdminUpdatedContactEvent event); + void afterAdminUpdatedContactDataEvent (final ObservableAdminUpdatedContactEvent event); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java index 5e30ece0..f1c33d3d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java @@ -32,9 +32,9 @@ import org.mxchange.jcountry.data.Country; import org.mxchange.jcountry.data.CountryData; import org.mxchange.jcountry.data.CountrySingletonBeanRemote; import org.mxchange.jcountry.events.AdminAddedCountryEvent; -import org.mxchange.jcountry.events.AdminEventCountryAdded; import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; import org.mxchange.pizzaapplication.beans.BasePizzaController; +import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; /** * An administrative country bean @@ -55,7 +55,7 @@ public class PizzaAdminCountryWebRequestBean extends BasePizzaController impleme */ @Inject @Any - private Event addedCountryEvent; + private Event addedCountryEvent; /** * Abroad dial prefix @@ -146,7 +146,7 @@ public class PizzaAdminCountryWebRequestBean extends BasePizzaController impleme } // Fire event - this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry)); + this.addedCountryEvent.fire(new AdminAddedCountryEvent(updatedCountry)); // Clear this bean this.clear(); diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationBean.java index c330d492..be3a6513 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationBean.java @@ -28,8 +28,8 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcountry.data.Country; import org.mxchange.jcountry.data.CountrySingletonBeanRemote; -import org.mxchange.jcountry.events.AdminAddedCountryEvent; import org.mxchange.pizzaapplication.beans.BasePizzaController; +import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; /** * A country bean @@ -73,7 +73,7 @@ public class PizzaCountryWebApplicationBean extends BasePizzaController implemen } @Override - public void afterAdminAddedCountry (@Observes final AdminAddedCountryEvent event) { + public void afterAdminAddedCountry (@Observes final ObservableAdminAddedCountryEvent event) { // Is all valid? if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationController.java index 02398f92..742b876b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebApplicationController.java @@ -19,7 +19,7 @@ package org.mxchange.pizzaapplication.beans.country; import java.io.Serializable; import java.util.List; import org.mxchange.jcountry.data.Country; -import org.mxchange.jcountry.events.AdminAddedCountryEvent; +import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; /** * An interface for country beans @@ -41,6 +41,6 @@ public interface PizzaCountryWebApplicationController extends Serializable { *

* @param event Event instance */ - void afterAdminAddedCountry (final AdminAddedCountryEvent event); + void afterAdminAddedCountry (final ObservableAdminAddedCountryEvent event); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java index e867da03..3fe8acbd 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java @@ -31,7 +31,6 @@ import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcustomercore.events.customer.added.AdminAddedCustomerEvent; -import org.mxchange.jcustomercore.events.customer.added.CustomerAdminAddedEvent; import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException; import org.mxchange.jcustomercore.model.customer.Customer; import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus; @@ -40,6 +39,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestCo import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote; import org.mxchange.pizzaapplication.model.customer.PizzaCustomer; import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestController; +import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent; /** * Administrative customer bean (controller) @@ -77,7 +77,7 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem */ @Inject @Any - private Event customerAddedEvent; + private Event customerAddedEvent; /** * General customer controller @@ -149,7 +149,7 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem } // Fire event - this.customerAddedEvent.fire(new CustomerAdminAddedEvent(updatedCustomer)); + this.customerAddedEvent.fire(new AdminAddedCustomerEvent(updatedCustomer)); // Redirect return "admin_list_customer"; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java index 11043388..44608896 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java @@ -32,12 +32,12 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcustomercore.events.customer.added.AdminAddedCustomerEvent; import org.mxchange.jcustomercore.model.customer.Customer; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController; import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote; +import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; +import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent; /** * A customer bean which hides the customer instance @@ -100,7 +100,7 @@ public class PizzaCustomerWebSessionBean extends BasePizzaController implements } @Override - public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) { + public void afterAdminAddedContact (@Observes final ObservableAdminAddedContactEvent event) { // The event must be valid if (null == event) { // Throw NPE @@ -121,7 +121,7 @@ public class PizzaCustomerWebSessionBean extends BasePizzaController implements } @Override - public void afterAdminAddedCustomer (@Observes final AdminAddedCustomerEvent event) { + public void afterAdminAddedCustomer (@Observes final ObservableAdminAddedCustomerEvent event) { // The event must be valid if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java index b05c5854..9edc446a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.util.List; import javax.ejb.Local; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; -import org.mxchange.jcustomercore.events.customer.added.AdminAddedCustomerEvent; import org.mxchange.jcustomercore.model.customer.Customer; +import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; +import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent; /** * An interface for customer beans @@ -38,7 +38,7 @@ public interface PizzaCustomerWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedContact (final AdminAddedContactEvent event); + void afterAdminAddedContact (final ObservableAdminAddedContactEvent event); /** * Observes events being fired when an administrator has added a new @@ -46,7 +46,7 @@ public interface PizzaCustomerWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedCustomer (final AdminAddedCustomerEvent event); + void afterAdminAddedCustomer (final ObservableAdminAddedCustomerEvent event); /** * Returns a list of all selectable contacts for user creation. Contacts diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index 70af17e1..7b917eec 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.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; import org.mxchange.pizzaapplication.beans.BasePizzaController; +import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent; /** * 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 UserLoggedInEvent event) { + public void afterUserLogin (@Observes final ObservableUserLoggedInEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("LandingLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N @@ -77,7 +77,7 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements } @Override - public void afterUserLogout (@Observes final ObserveableUserLogoutEvent event) { + public void afterUserLogout (@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 835f0a28..ef48b941 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionController.java @@ -18,8 +18,8 @@ package org.mxchange.pizzaapplication.beans.localization; import java.io.Serializable; import java.util.Locale; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; +import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent; /** * An interface for localization change beans @@ -33,14 +33,14 @@ public interface PizzaLocalizationSessionController extends Serializable { *

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

* @param event Event instance */ - void afterUserLogout (final ObserveableUserLogoutEvent event); + void afterUserLogout (final ObservableUserLogoutEvent event); /** * Getter for locale diff --git a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java index 0b2c4055..31046265 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java @@ -34,10 +34,7 @@ import javax.naming.NamingException; import org.mxchange.jusercore.container.login.LoginContainer; import org.mxchange.jusercore.container.login.UserLoginContainer; import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.login.UserLoginEvent; -import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; import org.mxchange.jusercore.events.logout.UserLogoutEvent; -import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; @@ -51,6 +48,9 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +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 @@ -113,14 +113,14 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements */ @Inject @Any - private Event userLoginEvent; + private Event userLoginEvent; /** * Event fired when user has logged out */ @Inject @Any - private Event userLogoutEvent; + private Event userLogoutEvent; /** * User's password history @@ -155,7 +155,7 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements } @Override - public void afterUserUpdatedPasswordEvent (@Observes final UpdatedUserPasswordEvent event) { + public void afterUserUpdatedPasswordEvent (@Observes final ObservableUpdatedUserPasswordEvent event) { // Check parameter if (null == event) { // Throw NPE @@ -215,7 +215,7 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements this.setBaseTemplatePathName(USER_BASE_TEMPLATE_NAME); //NOI18N // Fire event away. Keep this last before return statement. - this.userLoginEvent.fire(new UserLoginEvent(confirmedUser)); + this.userLoginEvent.fire(new UserLoggedInEvent(confirmedUser)); // Clear this bean this.clear(); diff --git a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java index 27b9cdd7..09b1c856 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java @@ -19,9 +19,9 @@ package org.mxchange.pizzaapplication.beans.login; import java.io.Serializable; import java.util.List; import javax.ejb.Local; -import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; 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 @@ -37,7 +37,7 @@ public interface PizzaUserLoginWebSessionController extends Serializable { *

* @param event Event being observed */ - void afterUserUpdatedPasswordEvent (final UpdatedUserPasswordEvent event); + void afterUserUpdatedPasswordEvent (final ObservableUpdatedUserPasswordEvent event); /** * Checks whether given clear-text password is in user's password history. diff --git a/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java index 242b141f..59b97c94 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java @@ -29,7 +29,6 @@ import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.registration.RegisteredUserEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.DataRepeatMismatchException; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; @@ -43,6 +42,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionControl import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; /** * A web bean for user registration @@ -86,7 +86,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme */ @Inject @Any - private Event registeredEvent; + private Event registeredEvent; /** * User controller @@ -174,7 +174,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme assert (registeredUser.getUserId() instanceof Long) : "registeredUser.userId is null after registerUser() was called."; //NOI18N // Fire event - this.registeredEvent.fire(new RegisteredUserEvent(registeredUser)); + this.registeredEvent.fire(new UserRegisteredEvent(registeredUser)); // All fine, redirect to proper page return "register_done"; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java index f775f8a8..8218cc15 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java @@ -26,7 +26,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.resendlink.ResendLinkUserAccountEvent; import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent; import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -37,6 +36,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +import org.mxchange.jusercore.events.resendlink.ObservableUserResendLinkAccountEvent; /** * A web session bean for resending confirmation link @@ -79,7 +79,7 @@ public class PizzaResendLinkWebSessionBean extends BasePizzaController implement */ @Inject @Any - private Event userResendLinkEvent; + private Event userResendLinkEvent; /** * Default constructor @@ -158,7 +158,7 @@ public class PizzaResendLinkWebSessionBean extends BasePizzaController implement } // Fire event - this.userResendLinkEvent.fire(new ResendLinkUserAccountEvent(user)); + this.userResendLinkEvent.fire(new UserResendLinkAccountEvent(user)); // Clear this bean this.clear(); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index 4673aa0b..b023d175 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -32,13 +32,9 @@ 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.UserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; -import org.mxchange.jusercore.events.user.add.AdminUserAddedEvent; import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent; -import org.mxchange.jusercore.events.user.linked.AdminUserLinkedEvent; import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent; -import org.mxchange.jusercore.events.user.update.AdminUserDataUpdatedEvent; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -57,6 +53,10 @@ 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) @@ -77,7 +77,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements */ @Inject @Any - private Event addedUserEvent; + private Event addedUserEvent; /** * Regular contact controller @@ -107,7 +107,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements */ @Inject @Any - private Event updatedUserDataEvent; + private Event updatedUserDataEvent; /** * General user EJB @@ -126,7 +126,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements */ @Inject @Any - private Event userLinkedEvent; + private Event userLinkedEvent; /** * User lock reason @@ -274,7 +274,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements User updatedUser = this.adminUserBean.linkUser(user); // Fire event - this.userLinkedEvent.fire(new AdminUserLinkedEvent(updatedUser)); + this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser)); // Remove contact instance this.beanHelper.setContact(null); @@ -283,7 +283,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements User updatedUser = this.adminUserBean.addUser(user); // Fire event - this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser)); + this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser)); } } catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) { // Throw again @@ -298,7 +298,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminUserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N @@ -389,7 +389,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements User updatedUser = this.userBean.updateUserData(user); // Fire event - this.updatedUserDataEvent.fire(new AdminUserDataUpdatedEvent(updatedUser)); + this.updatedUserDataEvent.fire(new AdminUpdatedUserDataEvent(updatedUser)); // Return to user list (for now) return "admin_list_user"; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestController.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestController.java index 99611231..db6a137d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestController.java @@ -17,8 +17,8 @@ package org.mxchange.pizzaapplication.beans.user; import java.io.Serializable; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.model.user.User; +import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; /** * An interface for user beans @@ -32,7 +32,7 @@ public interface PizzaAdminUserWebRequestController extends Serializable { *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterRegistrationEvent (final ObservableUserRegisteredEvent event); /** * Adds user instance to database by preparing a complete user instance and diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java index 94c87ca5..dbe0972d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java @@ -34,14 +34,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; -import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; -import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; -import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent; import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent; -import org.mxchange.jusercore.events.user.update.UserUpdatedPersonalDataEvent; import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; @@ -55,6 +48,13 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionControl import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController; import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController; +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) @@ -98,7 +98,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz */ @Inject @Any - private Event updatedPersonalDataEvent; + private Event updatedPersonalDataEvent; /** * Remote user bean @@ -175,7 +175,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) { + public void afterAdminAddedUserEvent (@Observes final ObservableAdminAddedUserEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterAdminAddedUserEvent: event={0} - CALLED!", event)); //NOI18N @@ -208,7 +208,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterAdminUpdatedUserDataEvent (@Observes final AdminUpdatedUserDataEvent event) { + public void afterAdminUpdatedUserDataEvent (@Observes final ObservableAdminUpdatedUserDataEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterAdminUpdatedUserEvent: event={0} - CALLED!", event)); //NOI18N @@ -238,7 +238,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N @@ -289,7 +289,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) { + public void afterUserConfirmedAccount (@Observes final ObservableUserConfirmedAccountEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N @@ -313,7 +313,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterUserLogin (@Observes final UserLoggedInEvent event) { + public void afterUserLogin (@Observes final ObservableUserLoggedInEvent event) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N @@ -346,7 +346,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterUserUpdatedPasswordEvent (@Observes final UpdatedUserPasswordEvent event) { + public void afterUserUpdatedPasswordEvent (@Observes final ObservableUpdatedUserPasswordEvent event) { // Check parameter if (null == event) { // Throw NPE @@ -367,7 +367,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public void afterUserUpdatedPersonalData (@Observes final UpdatedUserPersonalDataEvent event) { + public void afterUserUpdatedPersonalData (@Observes final ObservableUpdatedUserPersonalDataEvent event) { // Check parameter if (null == event) { // Throw NPE @@ -518,7 +518,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz User updatedUser = this.userBean.updateUserPersonalData(user); // Fire event - this.updatedPersonalDataEvent.fire(new UserUpdatedPersonalDataEvent(updatedUser)); + this.updatedPersonalDataEvent.fire(new UpdatedUserPersonalDataEvent(updatedUser)); // All fine return "contact_data_saved"; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java index aa87e4af..3ab7657a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java @@ -19,17 +19,17 @@ package org.mxchange.pizzaapplication.beans.user; import java.io.Serializable; import java.util.List; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; -import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; -import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; -import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent; -import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent; 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 @@ -48,21 +48,21 @@ public interface PizzaUserWebSessionController extends Serializable { *

* @param event Event being fired */ - void afterAdminAddedUserEvent (final AdminAddedUserEvent event); + void afterAdminAddedUserEvent (final ObservableAdminAddedUserEvent event); /** * Event observer for updated user data by administrator *

* @param event Event being updated */ - void afterAdminUpdatedUserDataEvent (final AdminUpdatedUserDataEvent event); + void afterAdminUpdatedUserDataEvent (final ObservableAdminUpdatedUserDataEvent event); /** * Event observer when user confirmed account. *

* @param event Event being fired */ - void afterUserConfirmedAccount (final UserConfirmedAccountEvent event); + void afterUserConfirmedAccount (final ObservableUserConfirmedAccountEvent event); /** * Method being call after user's password has been updated (and history @@ -70,28 +70,28 @@ public interface PizzaUserWebSessionController extends Serializable { *

* @param event Event being observed */ - void afterUserUpdatedPasswordEvent (final UpdatedUserPasswordEvent event); + void afterUserUpdatedPasswordEvent (final ObservableUpdatedUserPasswordEvent event); /** * Listens to fired event when user updated personal data *

* @param event Event being fired */ - void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event); + void afterUserUpdatedPersonalData (final ObservableUpdatedUserPersonalDataEvent event); /** * Event observer for new user registrations *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterRegistrationEvent (final ObservableUserRegisteredEvent event); /** * Event observer for logged-in user *

* @param event Event instance */ - void afterUserLogin (final UserLoggedInEvent event); + void afterUserLogin (final ObservableUserLoggedInEvent event); /** * All users diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java index 0dee5e18..197a49d5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java @@ -28,7 +28,6 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; -import org.mxchange.jusercore.events.user.password_change.UserUpdatedPasswordEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; @@ -40,6 +39,7 @@ import org.mxchange.jusercore.model.user.password_history.PasswordHistory; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController; +import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent; /** * A user password (change) bean (controller) @@ -92,7 +92,7 @@ public class PizzaUserPasswordWebRequestBean extends BasePizzaController impleme */ @Any @Inject - private Event userUpdatedPasswordEvent; + private Event userUpdatedPasswordEvent; /** * Default constructor @@ -181,7 +181,7 @@ public class PizzaUserPasswordWebRequestBean extends BasePizzaController impleme PasswordHistory passwordHistory = this.userBean.updateUserPassword(user, baseUrl); // Fire event - this.userUpdatedPasswordEvent.fire(new UserUpdatedPasswordEvent(passwordHistory)); + this.userUpdatedPasswordEvent.fire(new UpdatedUserPasswordEvent(passwordHistory)); } catch (final UserNotFoundException | UserStatusUnconfirmedException | UserStatusLockedException ex) { // Clear bean this.clear(); diff --git a/src/java/org/mxchange/pizzaapplication/validator/user/PizzaUserIdValidator.java b/src/java/org/mxchange/pizzaapplication/validator/user/PizzaUserIdValidator.java index c1e0975a..7beb2630 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/user/PizzaUserIdValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/user/PizzaUserIdValidator.java @@ -32,9 +32,9 @@ import javax.naming.NamingException; import org.mxchange.jcoreee.validator.number.BaseLongValidator; import org.mxchange.jcoreeelogger.beans.local.logger.Log; import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; +import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; /** * A validator for user ids @@ -90,7 +90,7 @@ public class PizzaUserIdValidator extends BaseLongValidator implements Validator *

* @param event User registration event */ - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterRegistrationEvent (@Observes final ObservableUserRegisteredEvent event) { // Trace message this.loggerBeanLocal.logTrace(MessageFormat.format("UserIdValidator:afterRegistrationEvent: event={0} - CALLED!", event)); //NOI18N -- 2.39.5