]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestController.java
updated JNDI names
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / user / PizzaAdminUserWebRequestController.java
index 966792f777c631939030d9abd7247466f881857b..41b2557d63609785335a991594cf43254951bd37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
 package org.mxchange.pizzaapplication.beans.user;
 
 import java.io.Serializable;
-import java.util.List;
-import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
-import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
 
 /**
  * An interface for user beans
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
  */
 public interface PizzaAdminUserWebRequestController extends Serializable {
 
        /**
-        * Listens to fired event when user updated personal data
+        * 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>
-        * @param event Event being fired
+        * @return Redirect outcome
         */
-       void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event);
+       String addUser ();
 
        /**
-        * 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.
+        * Deletes given user account
         * <p>
-        * @param userId User id
+        * @param user User instance to delete
         * <p>
-        * @return User instance
-        * <p>
-        * @throws UserNotFoundException If the user is not found
+        * @return Redirect outcome
         */
-       User lookupUserById (final Long userId) throws UserNotFoundException;
+       String deleteUserData (final User user);
 
        /**
-        * All users
+        * Edits currently loaded user's data in database.
         * <p>
-        * @return A list of all public user profiles
+        * @return Redirect outcome
         */
-       List<User> allUsers ();
+       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
         */
-       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
@@ -89,31 +86,73 @@ public interface PizzaAdminUserWebRequestController extends Serializable {
        void setUserName (final String userName);
 
        /**
-        * Getter for unencrypted user password
+        * Getter for clear-text user password
         * <p>
-        * @return Unencrypted user password
+        * @return Clear-text user password
         */
        String getUserPassword ();
 
        /**
-        * Setter for unencrypted user password
+        * Setter for clear-text user password
         * <p>
-        * @param userPassword Unencrypted user password
+        * @param userPassword Clear-text user password
         */
        void setUserPassword (final String userPassword);
 
        /**
-        * Getter for unencrypted user password repeated
+        * Getter for clear-text user password repeated
         * <p>
-        * @return Unencrypted user password repeated
+        * @return Clear-text user password repeated
         */
        String getUserPasswordRepeat ();
 
        /**
-        * Setter for unencrypted user password repeated
+        * Setter for clear-text user password repeated
         * <p>
-        * @param userPasswordRepeat Unencrypted user password repeated
+        * @param userPasswordRepeat Clear-text user password repeated
         */
        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);
+
+       /**
+        * Getter for user delete reason
+        * <p>
+        * @return User delete reason
+        */
+       String getUserDeleteReason ();
+
+       /**
+        * Setter for user delete reason
+        * <p>
+        * @param userDeleteReason User delete reason
+        */
+       void setUserDeleteReason (final String userDeleteReason);
+
 }