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.pizzaapplication.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 PizzaAdminUserWebRequestController 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.
73 * Edits cuirrently loaded user's data in database.
78 * Getter for user name
82 String getUserName ();
85 * Setter for user name
87 * @param userName User name
89 void setUserName (final String userName);
92 * Getter for unencrypted user password
94 * @return Unencrypted user password
96 String getUserPassword ();
99 * Setter for unencrypted user password
101 * @param userPassword Unencrypted user password
103 void setUserPassword (final String userPassword);
106 * Getter for unencrypted user password repeated
108 * @return Unencrypted user password repeated
110 String getUserPasswordRepeat ();
113 * Setter for unencrypted user password repeated
115 * @param userPasswordRepeat Unencrypted user password repeated
117 void setUserPasswordRepeat (final String userPasswordRepeat);