]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / user / JobsAdminUserWebRequestController.java
index 928235011647053334baa215b7ffae23c05c9f6e..2a99cf3258be5b734a3f418a1dbea069193323b6 100644 (file)
 package org.mxchange.jjobs.beans.user;
 
 import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
-import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
-import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -37,96 +32,43 @@ public interface JobsAdminUserWebRequestController extends Serializable {
         * <p>
         * @param event User registration event
         */
-       void afterRegistrationEvent (final UserRegisteredEvent event);
+       void afterUserRegistrationEvent (final UserRegisteredEvent event);
 
        /**
-        * Event observer for logged-in user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLogin (final UserLoggedInEvent event);
-
-       /**
-        * Listens to fired event when user updated personal data
-        * <p>
-        * @param event Event being fired
-        */
-       void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event);
-
-       /**
-        * 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
+        * 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 ();
 
        /**
-        * All public user profiles
+        * Edits cuirrently loaded user's data in database.
         * <p>
-        * @return A list of all public user profiles
+        * @return Redirect outcome
         */
-       List<User> allVisibleUsers ();
+       String editUserData ();
 
        /**
-        * Checks whether users are registered
+        * Locks selected user's account. This method makes sure that a lock reason
+        * is provided that th user later can read on login attempts.
         * <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.
+        * @param user User instance to be locked
         * <p>
         * @return Redirect outcome
         */
-       String addUser ();
+       String lockUserAccount (final User user);
 
        /**
-        * Edits cuirrently loaded user's data in database.
+        * Unlocks selected user's account. This method makes sure that the account
+        * is locked.
+        * <p>
+        * @param user User instance to be unlocked
         * <p>
         * @return Redirect outcome
         */
-       String editUserData ();
+       String unlockUserAccount (final User user);
 
        /**
         * Getter for user name
@@ -171,11 +113,31 @@ public interface JobsAdminUserWebRequestController extends Serializable {
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
        /**
-        * Returns a list of all selectable contacts for user creation. Contacts
-        * from already existing users are excluded in this list.
+        * Getter for flag if user needs to change password
+        * <p>
+        * @return Flag if user needs to change password
+        */
+       Boolean getUserMustChangePassword ();
+
+       /**
+        * Setter for flag if user needs to change password
+        * <p>
+        * @param userMustChangePassword Flag if user needs to change password
+        */
+       void setUserMustChangePassword (final Boolean userMustChangePassword);
+
+       /**
+        * Getter for user lock reason
+        * <p>
+        * @return User lock reason
+        */
+       String getUserLockReason ();
+
+       /**
+        * Setter for user lock reason
         * <p>
-        * @return A list of all selectable contacts
+        * @param userLockReason User lock reason
         */
-       List<Contact> selectableContacts ();
+       void setUserLockReason (final String userLockReason);
 
 }