<Scene Scope="Project" version="2">
<Scope Scope="Faces Configuration Only"/>
<Scope Scope="Project">
- <Node id="admin/customer/admin_customer_delete.xhtml" x="650" y="450" zoom="true"/>
- <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1400" y="150" zoom="true"/>
- <Node id="customer/checkout2.xhtml" x="900" y="750" zoom="true"/>
- <Node id="admin/contact/admin_contact_show.xhtml" x="1650" y="300" zoom="true"/>
- <Node id="privacy.xhtml" x="1400" y="900" zoom="true"/>
- <Node id="guest/user/show_addressbook.xhtml" x="150" y="900" zoom="true"/>
- <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="2650" y="300" zoom="true"/>
- <Node id="admin/user/admin_user_show.xhtml" x="400" y="1500" zoom="true"/>
- <Node id="admin/index.xhtml" x="1900" y="300" zoom="true"/>
- <Node id="user/login_own_addressbooks.xhtml" x="1150" y="150" zoom="true"/>
- <Node id="user/login_user_data_saved.xhtml" x="400" y="1200" zoom="true"/>
- <Node id="customer/register.xhtml" x="1650" y="750" zoom="true"/>
- <Node id="admin/category/admin_category_list.xhtml" x="1150" y="450" zoom="true"/>
- <Node id="item_added.xhtml" x="400" y="1350" zoom="true"/>
- <Node id="admin/admin_logout.xhtml" x="1150" y="600" zoom="true"/>
- <Node id="user/login_data_saved.xhtml" x="900" y="1200" zoom="true"/>
- <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="300" zoom="true"/>
- <Node id="customer/lost_passwd.xhtml" x="400" y="600" zoom="true"/>
- <Node id="index.xhtml" x="400" y="900" zoom="true"/>
- <Node id="guest/user/user_list.xhtml" x="150" y="1050" zoom="true"/>
- <Node id="user/login_edit_user_data.xhtml" x="150" y="750" zoom="true"/>
- <Node id="customer/checkout_done.xhtml" x="1900" y="450" zoom="true"/>
- <Node id="customer/login.xhtml" x="1400" y="450" zoom="true"/>
- <Node id="*" x="2150" y="600" zoom="true"/>
- <Node id="admin/customer/admin_customer_unlock.xhtml" x="900" y="1350" zoom="true"/>
- <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="150" y="300" zoom="true"/>
- <Node id="user/login_index.xhtml" x="2150" y="150" zoom="true"/>
- <Node id="admin/product/admin_product_edit.xhtml" x="650" y="1050" zoom="true"/>
- <Node id="guest/user/lost_passwd.xhtml" x="900" y="1050" zoom="true"/>
- <Node id="guest/user/register_done.xhtml" x="1150" y="750" zoom="true"/>
- <Node id="guest/user/show_addressbook_entries.xhtml" x="2400" y="300" zoom="true"/>
- <Node id="user/login.xhtml" x="900" y="600" zoom="true"/>
+ <Node id="admin/customer/admin_customer_delete.xhtml" x="150" y="1050" zoom="true"/>
+ <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="400" y="600" zoom="true"/>
+ <Node id="customer/checkout2.xhtml" x="900" y="600" zoom="true"/>
+ <Node id="admin/contact/admin_contact_show.xhtml" x="2400" y="300" zoom="true"/>
+ <Node id="privacy.xhtml" x="900" y="1350" zoom="true"/>
+ <Node id="guest/user/show_addressbook.xhtml" x="1900" y="150" zoom="true"/>
+ <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="650" y="1200" zoom="true"/>
+ <Node id="admin/user/admin_user_show.xhtml" x="900" y="750" zoom="true"/>
+ <Node id="admin/index.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="user/login_own_addressbooks.xhtml" x="400" y="1200" zoom="true"/>
+ <Node id="customer/register.xhtml" x="1400" y="300" zoom="true"/>
+ <Node id="user/login_user_data_saved.xhtml" x="2150" y="300" zoom="true"/>
+ <Node id="item_added.xhtml" x="650" y="750" zoom="true"/>
+ <Node id="admin/category/admin_category_list.xhtml" x="1150" y="1050" zoom="true"/>
+ <Node id="admin/admin_logout.xhtml" x="2900" y="150" zoom="true"/>
+ <Node id="user/login_data_saved.xhtml" x="650" y="1350" zoom="true"/>
+ <Node id="admin/user/admin_user_unlock.xhtml" x="400" y="1350" zoom="true"/>
+ <Node id="customer/lost_passwd.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="index.xhtml" x="150" y="1350" zoom="true"/>
+ <Node id="guest/user/user_list.xhtml" x="2150" y="600" zoom="true"/>
+ <Node id="user/login_edit_user_data.xhtml" x="2400" y="450" zoom="true"/>
+ <Node id="customer/checkout_done.xhtml" x="150" y="1650" zoom="true"/>
+ <Node id="customer/login.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="*" x="2150" y="450" zoom="true"/>
+ <Node id="admin/customer/admin_customer_unlock.xhtml" x="150" y="750" zoom="true"/>
+ <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="user/login_index.xhtml" x="650" y="900" zoom="true"/>
+ <Node id="admin/product/admin_product_edit.xhtml" x="1900" y="450" zoom="true"/>
+ <Node id="guest/user/lost_passwd.xhtml" x="650" y="600" zoom="true"/>
+ <Node id="guest/user/register_done.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="guest/user/show_addressbook_entries.xhtml" x="1400" y="750" zoom="true"/>
+ <Node id="user/login.xhtml" x="2150" y="150" zoom="true"/>
<Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="150" zoom="true"/>
- <Node id="admin/country/admin_country_list.xhtml" x="1150" y="300" zoom="true"/>
- <Node id="login/login_edit_user_data.xhtml" x="1650" y="450" zoom="true"/>
- <Node id="admin/customer/admin_customer_edit.xhtml" x="2400" y="150" zoom="true"/>
- <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="2900" y="150" zoom="true"/>
- <Node id="user/login_change_password.xhtml" x="1150" y="900" zoom="true"/>
- <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1650" y="900" zoom="true"/>
- <Node id="admin/contact/admin_contact_export.xhtml" x="400" y="450" zoom="true"/>
- <Node id="customer/checkout.xhtml" x="1650" y="600" zoom="true"/>
- <Node id="guest/user/user_profile.xhtml" x="650" y="300" zoom="true"/>
- <Node id="admin/product/admin_product_delete.xhtml" x="1150" y="1200" zoom="true"/>
- <Node id="guest/user/confirm_account.xhtml" x="400" y="750" zoom="true"/>
- <Node id="basket.xhtml" x="900" y="450" zoom="true"/>
- <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="600" zoom="true"/>
- <Node id="admin/user/admin_user_delete.xhtml" x="150" y="1200" zoom="true"/>
- <Node id="exception.xhtml" x="2650" y="150" zoom="true"/>
- <Node id="admin/category/admin_category_delete.xhtml" x="150" y="450" zoom="true"/>
- <Node id="login/login_index.xhtml" x="1900" y="600" zoom="true"/>
- <Node id="admin/user/admin_user_edit.xhtml" x="650" y="750" zoom="true"/>
- <Node id="guest/user/register_page2.xhtml" x="900" y="900" zoom="true"/>
- <Node id="terms.xhtml" x="2150" y="450" zoom="true"/>
- <Node id="admin/contact/admin_contact_edit.xhtml" x="150" y="150" zoom="true"/>
- <Node id="admin/contact/admin_contact_list.xhtml" x="400" y="150" zoom="true"/>
- <Node id="admin/user/admin_user_list.xhtml" x="2150" y="300" zoom="true"/>
- <Node id="admin/country/admin_country_delete.xhtml" x="400" y="300" zoom="true"/>
- <Node id="user/login_change_personal_data.xhtml" x="2400" y="450" zoom="true"/>
- <Node id="admin/category/admin_category_edit.xhtml" x="1900" y="150" zoom="true"/>
- <Node id="admin/country/admin_country_edit.xhtml" x="1400" y="300" zoom="true"/>
- <Node id="logout.xhtml" x="150" y="1350" zoom="true"/>
- <Node id="user/login_add_addressbook.xhtml" x="150" y="1650" zoom="true"/>
- <Node id="user/login_contact_data_saved.xhtml" x="1400" y="1050" zoom="true"/>
- <Node id="user/user_profile.xhtml" x="1400" y="750" zoom="true"/>
- <Node id="admin/contact/admin_contact_delete.xhtml" x="150" y="1500" zoom="true"/>
- <Node id="imprint.xhtml" x="1400" y="600" zoom="true"/>
- <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="650" y="150" zoom="true"/>
- <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="650" y="600" zoom="true"/>
- <Node id="guest/user/login.xhtml" x="1150" y="1050" zoom="true"/>
- <Node id="admin/customer/admin_customer_list.xhtml" x="650" y="1350" zoom="true"/>
- <Node id="guest/user/register.xhtml" x="650" y="900" zoom="true"/>
- <Node id="user/login_change_email_address.xhtml" x="1650" y="150" zoom="true"/>
- <Node id="admin/product/admin_product_list.xhtml" x="400" y="1050" zoom="true"/>
+ <Node id="admin/country/admin_country_list.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="login/login_edit_user_data.xhtml" x="400" y="1050" zoom="true"/>
+ <Node id="admin/customer/admin_customer_edit.xhtml" x="2650" y="150" zoom="true"/>
+ <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="600" zoom="true"/>
+ <Node id="user/login_change_password.xhtml" x="2650" y="300" zoom="true"/>
+ <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="900" y="300" zoom="true"/>
+ <Node id="customer/checkout.xhtml" x="1150" y="300" zoom="true"/>
+ <Node id="admin/contact/admin_contact_export.xhtml" x="2400" y="150" zoom="true"/>
+ <Node id="guest/user/user_profile.xhtml" x="900" y="900" zoom="true"/>
+ <Node id="admin/product/admin_product_delete.xhtml" x="400" y="1500" zoom="true"/>
+ <Node id="guest/user/confirm_account.xhtml" x="1650" y="750" zoom="true"/>
+ <Node id="basket.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="exception.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="1200" zoom="true"/>
+ <Node id="admin/user/admin_user_delete.xhtml" x="900" y="1200" zoom="true"/>
+ <Node id="admin/category/admin_category_delete.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="login/login_index.xhtml" x="150" y="900" zoom="true"/>
+ <Node id="guest/user/register_page2.xhtml" x="1400" y="150" zoom="true"/>
+ <Node id="admin/user/admin_user_edit.xhtml" x="1400" y="1050" zoom="true"/>
+ <Node id="terms.xhtml" x="1150" y="900" zoom="true"/>
+ <Node id="admin/contact/admin_contact_edit.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="admin/contact/admin_contact_list.xhtml" x="1650" y="900" zoom="true"/>
+ <Node id="admin/user/admin_user_list.xhtml" x="1150" y="1200" zoom="true"/>
+ <Node id="admin/country/admin_country_delete.xhtml" x="1650" y="600" zoom="true"/>
+ <Node id="user/login_change_personal_data.xhtml" x="400" y="900" zoom="true"/>
+ <Node id="admin/category/admin_category_edit.xhtml" x="1400" y="900" zoom="true"/>
+ <Node id="logout.xhtml" x="1150" y="450" zoom="true"/>
+ <Node id="admin/country/admin_country_edit.xhtml" x="900" y="1050" zoom="true"/>
+ <Node id="user/login_add_addressbook.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="user/login_contact_data_saved.xhtml" x="650" y="1050" zoom="true"/>
+ <Node id="admin/contact/admin_contact_delete.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="user/user_profile.xhtml" x="150" y="1500" zoom="true"/>
+ <Node id="imprint.xhtml" x="1650" y="150" zoom="true"/>
+ <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1650" y="300" zoom="true"/>
+ <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1150" y="600" zoom="true"/>
+ <Node id="guest/user/login.xhtml" x="1900" y="300" zoom="true"/>
+ <Node id="admin/customer/admin_customer_list.xhtml" x="1150" y="750" zoom="true"/>
+ <Node id="guest/user/register.xhtml" x="400" y="750" zoom="true"/>
+ <Node id="user/login_change_email_address.xhtml" x="1650" y="450" zoom="true"/>
+ <Node id="admin/product/admin_product_list.xhtml" x="1400" y="450" zoom="true"/>
<Node id="admin/customer/admin_customer_show.xhtml" x="1900" y="750" zoom="true"/>
- <Node id="customer/empty_basket.xhtml" x="650" y="1200" zoom="true"/>
+ <Node id="customer/empty_basket.xhtml" x="1900" y="600" zoom="true"/>
</Scope>
<Scope Scope="All Faces Configurations"/>
</Scene>
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
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;
throw new NullPointerException("event is null"); //NOI18N
} else if (event.getUpdatedContact() == null) {
// Throw NPE again
- throw new NullPointerException("event.updatedUser is null"); //NOI18N
+ throw new NullPointerException("event.updatedContact is null"); //NOI18N
} else if (event.getUpdatedContact().getContactId() == null) {
// userId is null
- throw new NullPointerException("event.updatedUser.userId is null"); //NOI18N
+ throw new NullPointerException("event.updatedContact.contactId is null"); //NOI18N
} else if (event.getUpdatedContact().getContactId() < 1) {
// Not avalid id
throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
throw new NullPointerException("event is null"); //NOI18N
} else if (event.getRegisteredUser() == null) {
// Throw NPE again
- throw new NullPointerException("event.user is null"); //NOI18N
+ throw new NullPointerException("event.registeredUser is null"); //NOI18N
} else if (event.getRegisteredUser().getUserId() == null) {
// userId is null
- throw new NullPointerException("event.user.userId is null"); //NOI18N
+ throw new NullPointerException("event.registeredUser.userId is null"); //NOI18N
} else if (event.getRegisteredUser().getUserId() < 1) {
// Not avalid id
throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getRegisteredUser(), event.getRegisteredUser().getUserId())); //NOI18N
//* NOISY-DEBUG: */ System.out.println("ContactWebBean:afterRegistration: EXIT!"); //NOI18N
}
+ @Override
+ public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) {
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
+
+ // event should not be null
+ if (null == event) {
+ // Throw NPE
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getConfirmedUser() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.confirmedUser is null"); //NOI18N
+ } else if (event.getConfirmedUser().getUserId() == null) {
+ // userId is null
+ throw new NullPointerException("event.confirmedUser.userId is null"); //NOI18N
+ } else if (event.getConfirmedUser().getUserId() < 1) {
+ // Not avalid id
+ throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getConfirmedUser(), event.getConfirmedUser().getUserId())); //NOI18N
+ }
+
+ // "Cache" contact instance
+ Contact contact = event.getConfirmedUser().getUserContact();
+
+ // Get iterator from list
+ Iterator<Contact> iterator = this.contactList.iterator();
+
+ // "Walk" through all entries
+ while (iterator.hasNext()) {
+ // Get next element
+ Contact next = iterator.next();
+
+ // Is id number the same?
+ if (Objects.equals(contact.getContactId(), next.getContactId())) {
+ // Found entry, so remove it and abort
+ this.contactList.remove(next);
+ break;
+ }
+ }
+
+ // Add contact to list
+ this.contactList.add(contact);
+ }
+
@Override
public void afterUserLogin (@Observes final UserLoggedInEvent event) {
// Trace message
throw new NullPointerException("event is null"); //NOI18N
} else if (event.getLoggedInUser() == null) {
// Throw NPE again
- throw new NullPointerException("event.user is null"); //NOI18N
+ throw new NullPointerException("event.loggedInUser is null"); //NOI18N
} else if (event.getLoggedInUser().getUserId() == null) {
// userId is null
- throw new NullPointerException("event.user.userId is null"); //NOI18N
+ throw new NullPointerException("event.loggedInUser.userId is null"); //NOI18N
} else if (event.getLoggedInUser().getUserId() < 1) {
// Not avalid id
throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedInUser(), event.getLoggedInUser().getUserId())); //NOI18N
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
+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;
}
@Override
- public void afterUserLogin (final @Observes UserLoggedInEvent event) {
+ public void afterUserConfirmedAccount (@Observes final UserConfirmedAccountEvent event) {
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
+
+ // event should not be null
+ if (null == event) {
+ // Throw NPE
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getConfirmedUser() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.confirmedUser is null"); //NOI18N
+ } else if (event.getConfirmedUser().getUserId() == null) {
+ // userId is null
+ throw new NullPointerException("event.confirmedUser.userId is null"); //NOI18N
+ } else if (event.getConfirmedUser().getUserId() < 1) {
+ // Not avalid id
+ throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getConfirmedUser(), event.getConfirmedUser().getUserId())); //NOI18N
+ }
+
+ // Get iterator from list
+ Iterator<User> iterator = this.userList.iterator();
+
+ // "Walk" through all entries
+ while (iterator.hasNext()) {
+ // Get next element
+ User next = iterator.next();
+
+ // Is id number the same?
+ if (Objects.equals(event.getConfirmedUser().getUserId(), next.getUserId())) {
+ // Found entry, so remove it and abort
+ this.userList.remove(next);
+ break;
+ }
+ }
+
+ // Add contact to list
+ this.userList.add(event.getConfirmedUser());
+ }
+
+ @Override
+ public void afterUserLogin (@Observes final UserLoggedInEvent event) {
// Trace message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N