package org.mxchange.addressbook.beans.user;
import java.io.Serializable;
-import java.util.List;
-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);
-
- /**
- * 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
* sending it to the EJB. The data set in the controller is being verified,
* e.g. if the user name or email address is not used yet.
+ * <p>
+ * @return Redirect outcome
*/
- void addUser ();
+ String addUser ();
/**
* Edits cuirrently loaded user's data in database.
+ * <p>
+ * @return Redirect outcome
*/
- void editUserData();
+ String editUserData ();
/**
* Getter for user name