]> git.mxchange.org Git - addressbook-war.git/blobdiff - src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java
Cleanup a bit + fix:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / user / AddressbookAdminUserWebRequestController.java
index 42bbe24f6970dd3ed28b2446f7f49d0bf061f063..b8ddc311c79076215108bf3498562ee27e8c3f22 100644 (file)
 package org.mxchange.addressbook.beans.user;
 
 import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
-import org.mxchange.jusercore.exceptions.UserNotFoundException;
-import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 
 /**
  * An interface for user beans
@@ -31,85 +27,11 @@ import org.mxchange.jusercore.model.user.User;
 public interface AddressbookAdminUserWebRequestController extends Serializable {
 
        /**
-        * Listens to fired event when user updated personal data
+        * Event observer for new user registrations
         * <p>
-        * @param event Event being fired
+        * @param event User registration event
         */
-       void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event);
-
-       /**
-        * All public user profiles
-        * <p>
-        * @return A list of all public user profiles
-        */
-       List<User> allVisibleUsers ();
-
-       /**
-        * Returns a list of all selectable contacts for user creation. Contacts
-        * from already existing users are excluded in this list.
-        * <p>
-        * @return A list of all selectable contacts
-        */
-       List<Contact> selectableContacts ();
-
-       /**
-        * Updates list with given user
-        * <p>
-        * @param user User to update
-        */
-       void updateList (final User user);
-
-       /**
-        * Checks whether the given contact is a user
-        * <p>
-        * @param contact Contact to check
-        * <p>
-        * @return Whether the contact is a user
-        */
-       boolean isContactFound (final Contact contact);
-
-       /**
-        * Checks whether a public user account is registered. This means that at
-        * least one user profile has its flag "public user profile" enabled.
-        * <p>
-        * @return Whether at least one user has a public profile
-        */
-       boolean isVisibleUserFound ();
-
-       /**
-        * Checks whether given user instance's name is used
-        * <p>
-        * @param user User instance's name to check
-        * <p>
-        * @return Whether it is already used
-        */
-       boolean isUserNameRegistered (final User user);
-
-       /**
-        * Tries to lookup user by given id number. If the user is not found or the
-        * account status is not CONFIRMED proper exceptions are thrown.
-        * <p>
-        * @param userId User id
-        * <p>
-        * @return User instance
-        * <p>
-        * @throws UserNotFoundException If the user is not found
-        */
-       User lookupUserById (final Long userId) throws UserNotFoundException;
-
-       /**
-        * All users
-        * <p>
-        * @return A list of all public user profiles
-        */
-       List<User> allUsers ();
-
-       /**
-        * Checks whether users are registered
-        * <p>
-        * @return Whether users are registered
-        */
-       boolean hasUsers ();
+       void afterRegistrationEvent (final UserRegisteredEvent event);
 
        /**
         * Adds user instance to database by preparing a complete user instance and