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;
21 import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
24 * An interface for user beans
26 * @author Roland Häder<roland@mxchange.org>
28 public interface AddressbookAdminUserWebRequestController extends Serializable {
31 * Event observer for new user registrations
33 * @param event User registration event
35 void afterRegistrationEvent (final ObservableUserRegisteredEvent 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 * Edits currently loaded user's data in database.
49 * @return Redirect outcome
51 String editUserData ();
54 * Locks selected user's account. This method makes sure that a lock reason
55 * is provided that th user later can read on login attempts.
57 * @param user User instance to be locked
59 * @return Redirect outcome
61 String lockUserAccount (final User user);
64 * Unlocks selected user's account. This method makes sure that the account
67 * @param user User instance to be unlocked
69 * @return Redirect outcome
71 String unlockUserAccount (final User user);
74 * Getter for user name
78 String getUserName ();
81 * Setter for user name
83 * @param userName User name
85 void setUserName (final String userName);
88 * Getter for unencrypted user password
90 * @return Unencrypted user password
92 String getUserPassword ();
95 * Setter for unencrypted user password
97 * @param userPassword Unencrypted user password
99 void setUserPassword (final String userPassword);
102 * Getter for unencrypted user password repeated
104 * @return Unencrypted user password repeated
106 String getUserPasswordRepeat ();
109 * Setter for unencrypted user password repeated
111 * @param userPasswordRepeat Unencrypted user password repeated
113 void setUserPasswordRepeat (final String userPasswordRepeat);
116 * Getter for flag if user needs to change password
118 * @return Flag if user needs to change password
120 Boolean getUserMustChangePassword ();
123 * Setter for flag if user needs to change password
125 * @param userMustChangePassword Flag if user needs to change password
127 void setUserMustChangePassword (final Boolean userMustChangePassword);
130 * Getter for user lock reason
132 * @return User lock reason
134 String getUserLockReason ();
137 * Setter for user lock reason
139 * @param userLockReason User lock reason
141 void setUserLockReason (final String userLockReason);