2 * Copyright (C) 2016 Roland Haeder
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 java.util.List;
21 import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
22 import org.mxchange.jusercore.exceptions.UserNotFoundException;
23 import org.mxchange.jusercore.model.user.User;
26 * An interface for user beans
28 * @author Roland Haeder<roland@mxchange.org>
30 public interface JobsAdminUserWebRequestController extends Serializable {
33 * Listens to fired event when user updated personal data
35 * @param event Event being fired
37 void afterUserUpdatedPersonalData (final UpdatedUserPersonalDataEvent event);
40 * Tries to lookup user by given id number. If the user is not found or the
41 * account status is not CONFIRMED proper exceptions are thrown.
43 * @param userId User id
45 * @return User instance
47 * @throws UserNotFoundException If the user is not found
49 User lookupUserById (final Long userId) throws UserNotFoundException;
54 * @return A list of all public user profiles
56 List<User> allUsers ();
59 * Checks whether users are registered
61 * @return Whether users are registered
66 * Adds user instance to database by preparing a complete user instance and
67 * sending it to the EJB. The data set in the controller is being verified,
68 * e.g. if the user name or email address is not used yet.
70 * @return Redirect outcome
75 * Edits cuirrently loaded user's data in database.
77 * @return Redirect outcome
79 String editUserData ();
82 * Getter for user name
86 String getUserName ();
89 * Setter for user name
91 * @param userName User name
93 void setUserName (final String userName);
96 * Getter for unencrypted user password
98 * @return Unencrypted user password
100 String getUserPassword ();
103 * Setter for unencrypted user password
105 * @param userPassword Unencrypted user password
107 void setUserPassword (final String userPassword);
110 * Getter for unencrypted user password repeated
112 * @return Unencrypted user password repeated
114 String getUserPasswordRepeat ();
117 * Setter for unencrypted user password repeated
119 * @param userPasswordRepeat Unencrypted user password repeated
121 void setUserPasswordRepeat (final String userPasswordRepeat);