]> 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 0f19a46be2e5afb7a48c3c96f84c1545d5011f65..2a99cf3258be5b734a3f418a1dbea069193323b6 100644 (file)
@@ -17,8 +17,7 @@
 package org.mxchange.jjobs.beans.user;
 
 import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jusercore.exceptions.UserNotFoundException;
+import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -29,42 +28,47 @@ import org.mxchange.jusercore.model.user.User;
 public interface JobsAdminUserWebRequestController 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 afterUserRegistrationEvent (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
+        * @return Redirect outcome
         */
-       boolean hasUsers ();
+       String editUserData ();
 
        /**
-        * 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.
+        * 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>
+        * @param user User instance to be locked
+        * <p>
+        * @return Redirect outcome
         */
-       void 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
         */
-       void editUserData();
+       String unlockUserAccount (final User user);
 
        /**
         * Getter for user name
@@ -108,4 +112,32 @@ public interface JobsAdminUserWebRequestController extends Serializable {
         */
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
+       /**
+        * 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>
+        * @param userLockReason User lock reason
+        */
+       void setUserLockReason (final String userLockReason);
+
 }