2 * Copyright (C) 2016 Roland Häder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.addressbook.beans.user;
19 import java.io.Serializable;
20 import org.mxchange.jusercore.model.user.User;
23 * An interface for user beans
25 * @author Roland Häder<roland@mxchange.org>
27 public interface AddressbookAdminUserWebRequestController extends Serializable {
30 * Adds user instance to database by preparing a complete user instance and
31 * sending it to the EJB. The data set in the controller is being verified,
32 * e.g. if the user name or email address is not used yet.
34 * @return Redirect outcome
39 * Edits currently loaded user's data in database.
41 * @return Redirect outcome
43 String editUserData ();
46 * Locks selected user's account. This method makes sure that a lock reason
47 * is provided that th user later can read on login attempts.
49 * @param user User instance to be locked
51 * @return Redirect outcome
53 String lockUserAccount (final User user);
56 * Unlocks selected user's account. This method makes sure that the account
59 * @param user User instance to be unlocked
61 * @return Redirect outcome
63 String unlockUserAccount (final User user);
66 * Getter for user name
70 String getUserName ();
73 * Setter for user name
75 * @param userName User name
77 void setUserName (final String userName);
80 * Getter for clear-text user password
82 * @return Clear-text user password
84 String getUserPassword ();
87 * Setter for clear-text user password
89 * @param userPassword Clear-text user password
91 void setUserPassword (final String userPassword);
94 * Getter for clear-text user password repeated
96 * @return Clear-text user password repeated
98 String getUserPasswordRepeat ();
101 * Setter for clear-text user password repeated
103 * @param userPasswordRepeat Clear-text user password repeated
105 void setUserPasswordRepeat (final String userPasswordRepeat);
108 * Getter for flag if user needs to change password
110 * @return Flag if user needs to change password
112 Boolean getUserMustChangePassword ();
115 * Setter for flag if user needs to change password
117 * @param userMustChangePassword Flag if user needs to change password
119 void setUserMustChangePassword (final Boolean userMustChangePassword);
122 * Getter for user lock reason
124 * @return User lock reason
126 String getUserLockReason ();
129 * Setter for user lock reason
131 * @param userLockReason User lock reason
133 void setUserLockReason (final String userLockReason);