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
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