]> git.mxchange.org Git - addressbook-war.git/blobdiff - src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestController.java
Rewrites:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / user / AddressbookAdminUserWebRequestController.java
index 5564dd69d190247c948d3105689f06e514a96ec6..42bbe24f6970dd3ed28b2446f7f49d0bf061f063 100644 (file)
@@ -18,6 +18,7 @@ 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;
@@ -36,6 +37,54 @@ public interface AddressbookAdminUserWebRequestController extends Serializable {
         */
        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.
@@ -66,13 +115,17 @@ public interface AddressbookAdminUserWebRequestController extends Serializable {
         * 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