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;
*/
public interface AddressbookAdminUserWebRequestController extends Serializable {
+ /**
+ * Listens to fired event when user updated personal data
+ * <p>
+ * @param event Event being fired
+ */
+ 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.
* 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