package org.mxchange.addressbook.beans.user;
import java.io.Serializable;
-import java.util.List;
-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 {
/**
- * 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.
+ * Event observer for new user registrations
* <p>
- * @param userId User id
- * <p>
- * @return User instance
- * <p>
- * @throws UserNotFoundException If the user is not found
+ * @param event User registration event
*/
- User lookupUserById (final Long userId) throws UserNotFoundException;
+ void afterRegistrationEvent (final UserRegisteredEvent event);
/**
- * All users
+ * 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 A list of all public user profiles
+ * @return Redirect outcome
*/
- List<User> allUsers ();
+ String addUser ();
/**
- * Checks whether users are registered
+ * Edits cuirrently loaded user's data in database.
* <p>
- * @return Whether users are registered
- */
- boolean hasUsers ();
-
- /**
- * 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.
+ * @return Redirect outcome
*/
- void addUser ();
+ String editUserData ();
/**
* Getter for user name