2 * Copyright (C) 2016, 2017 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.pizzaapplication.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 PizzaAdminUserWebRequestController 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 * Deletes given user account
41 * @param user User instance to delete
43 * @return Redirect outcome
45 String deleteUserData (final User user);
48 * Edits currently loaded user's data in database.
50 * @return Redirect outcome
52 String editUserData ();
55 * Locks selected user's account. This method makes sure that a lock reason
56 * is provided that th user later can read on login attempts.
58 * @param user User instance to be locked
60 * @return Redirect outcome
62 String lockUserAccount (final User user);
65 * Unlocks selected user's account. This method makes sure that the account
68 * @param user User instance to be unlocked
70 * @return Redirect outcome
72 String unlockUserAccount (final User user);
75 * Getter for user name
79 String getUserName ();
82 * Setter for user name
84 * @param userName User name
86 void setUserName (final String userName);
89 * Getter for clear-text user password
91 * @return Clear-text user password
93 String getUserPassword ();
96 * Setter for clear-text user password
98 * @param userPassword Clear-text user password
100 void setUserPassword (final String userPassword);
103 * Getter for clear-text user password repeated
105 * @return Clear-text user password repeated
107 String getUserPasswordRepeat ();
110 * Setter for clear-text user password repeated
112 * @param userPasswordRepeat Clear-text user password repeated
114 void setUserPasswordRepeat (final String userPasswordRepeat);
117 * Getter for flag if user needs to change password
119 * @return Flag if user needs to change password
121 Boolean getUserMustChangePassword ();
124 * Setter for flag if user needs to change password
126 * @param userMustChangePassword Flag if user needs to change password
128 void setUserMustChangePassword (final Boolean userMustChangePassword);
131 * Getter for user lock reason
133 * @return User lock reason
135 String getUserLockReason ();
138 * Setter for user lock reason
140 * @param userLockReason User lock reason
142 void setUserLockReason (final String userLockReason);
145 * Getter for user delete reason
147 * @return User delete reason
149 String getUserDeleteReason ();
152 * Setter for user delete reason
154 * @param userDeleteReason User delete reason
156 void setUserDeleteReason (final String userDeleteReason);