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.jjobs.beans.user;
19 import java.io.Serializable;
20 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
21 import org.mxchange.jusercore.model.user.User;
24 * An interface for user beans
26 * @author Roland Häder<roland@mxchange.org>
28 public interface JobsAdminUserWebRequestController extends Serializable {
31 * Event observer for new user registrations
33 * @param event User registration event
35 void afterUserRegistrationEvent (final UserRegisteredEvent event);
38 * Adds user instance to database by preparing a complete user instance and
39 * sending it to the EJB. The data set in the controller is being verified,
40 * e.g. if the user name or email address is not used yet.
42 * @return Redirect outcome
47 * Deletes given user account
49 * @param user User instance to delete
51 * @return Redirect outcome
53 String deleteUserData (final User user);
56 * Edits currently loaded user's data in database.
58 * @return Redirect outcome
60 String editUserData ();
63 * Locks selected user's account. This method makes sure that a lock reason
64 * is provided that th user later can read on login attempts.
66 * @param user User instance to be locked
68 * @return Redirect outcome
70 String lockUserAccount (final User user);
73 * Unlocks selected user's account. This method makes sure that the account
76 * @param user User instance to be unlocked
78 * @return Redirect outcome
80 String unlockUserAccount (final User user);
83 * Getter for user name
87 String getUserName ();
90 * Setter for user name
92 * @param userName User name
94 void setUserName (final String userName);
97 * Getter for unencrypted user password
99 * @return Unencrypted user password
101 String getUserPassword ();
104 * Setter for unencrypted user password
106 * @param userPassword Unencrypted user password
108 void setUserPassword (final String userPassword);
111 * Getter for unencrypted user password repeated
113 * @return Unencrypted user password repeated
115 String getUserPasswordRepeat ();
118 * Setter for unencrypted user password repeated
120 * @param userPasswordRepeat Unencrypted user password repeated
122 void setUserPasswordRepeat (final String userPasswordRepeat);
125 * Getter for flag if user needs to change password
127 * @return Flag if user needs to change password
129 Boolean getUserMustChangePassword ();
132 * Setter for flag if user needs to change password
134 * @param userMustChangePassword Flag if user needs to change password
136 void setUserMustChangePassword (final Boolean userMustChangePassword);
139 * Getter for user lock reason
141 * @return User lock reason
143 String getUserLockReason ();
146 * Setter for user lock reason
148 * @param userLockReason User lock reason
150 void setUserLockReason (final String userLockReason);
153 * Getter for user delete reason
155 * @return User delete reason
157 String getUserDeleteReason ();
160 * Setter for user delete reason
162 * @param userDeleteReason User delete reason
164 void setUserDeleteReason (final String userDeleteReason);