]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java
Please cherry-pick:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / user / login / PizzaUserLoginWebSessionBean.java
index 339f26d2cdc405819dc883e8d2f7f5b2af8ac7d0..a2e82bfa72497381a1731bb59064c47a8bfa17f0 100644 (file)
@@ -49,7 +49,7 @@ import org.mxchange.juserlogincore.events.logout.UserLogoutEvent;
 import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
 import org.mxchange.juserlogincore.login.UserLoginUtils;
-import org.mxchange.juserlogincore.model.login.user.UserLoginSessionBeanRemote;
+import org.mxchange.juserlogincore.model.user.login.UserLoginSessionBeanRemote;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
 
@@ -177,7 +177,12 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                this.updatePasswordHistory(event.getPasswordHistory());
        }
 
-       @Override
+       /**
+        * Logout for administrator area. If a logged-in user instance exists, it is
+        * being logged-out, too.
+        * <p>
+        * @return Outcome (should be redirected)
+        */
        public String doAdminLogout () {
                // Is a user logged-in?
                if (this.isUserLoggedIn()) {
@@ -195,17 +200,21 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                return "index?faces-redirect=true"; //NOI18N
        }
 
-       @Override
+       /**
+        * Logins the user, if the account is found, confirmed and unlocked.
+        * <p>
+        * @return Redirect target
+        */
        public String doUserLogin () {
                // Get user instance
                User user = this.userController.createUserLogin();
 
                // Create login container
-               LoginContainer container = new UserLoginContainer(user, this.userController.getUserPassword());
+               LoginContainer loginContainer = new UserLoginContainer(user, this.userController.getUserPassword());
 
                try {
                        // Call bean
-                       User confirmedUser = this.userLoginBean.validateUserAccountStatus(container);
+                       User confirmedUser = this.userLoginBean.validateUserAccountStatus(loginContainer);
 
                        // All fine here so set it here
                        this.setLoggedInUser(confirmedUser);
@@ -241,7 +250,11 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                }
        }
 
-       @Override
+       /**
+        * Logout for current user by invalidating the current session.
+        * <p>
+        * @return Outcome (should be redirected)
+        */
        public String doUserLogout () {
                // Is loggedInUser set?
                if (this.getLoggedInUser() == null) {
@@ -289,12 +302,20 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                this.loggedInUser = loggedInUser;
        }
 
-       @Override
+       /**
+        * Getter for current password (clear text)
+        * <p>
+        * @return Current password
+        */
        public String getUserCurrentPassword () {
                return this.userCurrentPassword;
        }
 
-       @Override
+       /**
+        * Setter for current password (clear text)
+        * <p>
+        * @param userCurrentPassword Current password
+        */
        public void setUserCurrentPassword (final String userCurrentPassword) {
                this.userCurrentPassword = userCurrentPassword;
        }
@@ -337,7 +358,7 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.userLoginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userLogin!org.mxchange.jusercore.model.login.user.UserLoginSessionBeanRemote"); //NOI18N
+                       this.userLoginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userLogin!org.mxchange.juserlogincore.model.user.login.UserLoginSessionBeanRemote"); //NOI18N
 
                        // Also find this
                        this.userPasswordHistoryBean = (UserPasswordHistorySessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userPasswordHistory!org.mxchange.jusercore.model.user.password_history.UserPasswordHistorySessionBeanRemote"); //NOI18N