From: Roland Häder Date: Fri, 13 May 2016 12:57:58 +0000 (+0200) Subject: added parameter 'createContactData' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=33d4425dd51034630c71b26561dd6173f0969571;p=addressbook-war.git added parameter 'createContactData' Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java index 78bd2a97..450f50c8 100644 --- a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java @@ -107,7 +107,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro @Override public String doFinishRegistration () { // Get user instance - User user = this.userController.createUserInstance(); + User user = this.userController.createUserInstance(true); // Is the user already used? if (null == user) { @@ -175,7 +175,7 @@ public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookContro @Override public String doRegisterMultiPage1 () { // Get user instance - User user = this.userController.createUserInstance(); + User user = this.userController.createUserInstance(false); // First check if user is not null and user name is not used + if same email address is entered if (null == user) { diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index d583d847..25535651 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -421,7 +421,7 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp } @Override - public User createUserInstance () { + public User createUserInstance (final boolean createContactData) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("{0}.createUserInstance: CALLED!", this.getClass().getSimpleName())); diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java index c665213f..59ca6338 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java @@ -19,7 +19,6 @@ package org.mxchange.addressbook.beans.user; import java.io.Serializable; import java.util.List; import org.mxchange.jcontacts.contact.Contact; -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; @@ -43,14 +42,6 @@ public interface AddressbookUserWebSessionController extends Serializable { */ public static final Integer MINIMUM_PASSWORD_LENGTH = 5; - /** - * Observes events being fired when an administrator has added a new - * contact. - *

- * @param event Event being fired - */ - void afterAdminAddedContact (final AdminAddedContactEvent event); - /** * Event observer for newly added users by adminstrator *

@@ -175,9 +166,11 @@ public interface AddressbookUserWebSessionController extends Serializable { /** * Creates an instance from all properties *

+ * @param createContactData Whether contact data should be created + *

* @return A user instance */ - User createUserInstance (); + User createUserInstance (final boolean createContactData); /** * Creates a user instance for login phase