X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fpizzaapplication%2Fbeans%2Fuser%2Flogin%2FPizzaUserLoginWebSessionBean.java;h=a2e82bfa72497381a1731bb59064c47a8bfa17f0;hb=33f2d7b5075cb337ba33ad938b7ed7a92f933a10;hp=339f26d2cdc405819dc883e8d2f7f5b2af8ac7d0;hpb=daf1a2ee244795c937c7c2c4f41698dcfdeb96bd;p=pizzaservice-war.git diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java index 339f26d2..a2e82bfa 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java @@ -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. + *

+ * @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. + *

+ * @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. + *

+ * @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) + *

+ * @return Current password + */ public String getUserCurrentPassword () { return this.userCurrentPassword; } - @Override + /** + * Setter for current password (clear text) + *

+ * @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