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.addressbook.beans.user;
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.jusercore.exceptions.UserNotFoundException;
22 import org.mxchange.jusercore.model.user.User;
25 * An interface for user beans
27 * @author Roland Haeder<roland@mxchange.org>
29 public interface AddressbookAdminUserWebSessionController extends Serializable {
32 * Tries to lookup user by given id number. If the user is not found or the
33 * account status is not CONFIRMED proper exceptions are thrown.
35 * @param userId User id
37 * @return User instance
39 * @throws UserNotFoundException If the user is not found
41 User lookupUserById (final Long userId) throws UserNotFoundException;
46 * @return A list of all public user profiles
48 List<User> allUsers ();
51 * Checks whether users are registered
53 * @return Whether users are registered
58 * Adds user instance to database by preparing a complete user instance and
59 * sending it to the EJB. The data set in the controller is being verified,
60 * e.g. if the user name or email address is not used yet.
65 * Getter for user name
69 String getUserName ();
72 * Setter for user name
74 * @param userName User name
76 void setUserName (final String userName);
79 * Getter for unencrypted user password
81 * @return Unencrypted user password
83 String getUserPassword ();
86 * Setter for unencrypted user password
88 * @param userPassword Unencrypted user password
90 void setUserPassword (final String userPassword);
93 * Getter for unencrypted user password repeated
95 * @return Unencrypted user password repeated
97 String getUserPasswordRepeat ();
100 * Setter for unencrypted user password repeated
102 * @param userPasswordRepeat Unencrypted user password repeated
104 void setUserPasswordRepeat (final String userPasswordRepeat);