]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
Continued:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / user / JobsAdminUserWebRequestController.java
1 /*
2  * Copyright (C) 2016 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jjobs.beans.user;
18
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;
23
24 /**
25  * An interface for user beans
26  * <p>
27  * @author Roland Haeder<roland@mxchange.org>
28  */
29 public interface JobsAdminUserWebRequestController extends Serializable {
30
31         /**
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.
34          * <p>
35          * @param userId User id
36          * <p>
37          * @return User instance
38          * <p>
39          * @throws UserNotFoundException If the user is not found
40          */
41         User lookupUserById (final Long userId) throws UserNotFoundException;
42
43         /**
44          * All users
45          * <p>
46          * @return A list of all public user profiles
47          */
48         List<User> allUsers ();
49
50         /**
51          * Checks whether users are registered
52          * <p>
53          * @return Whether users are registered
54          */
55         boolean hasUsers ();
56
57         /**
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.
61          */
62         void addUser ();
63
64         /**
65          * Edits cuirrently loaded user's data in database.
66          */
67         void editUserData();
68
69         /**
70          * Getter for user name
71          * <p>
72          * @return User name
73          */
74         String getUserName ();
75
76         /**
77          * Setter for user name
78          * <p>
79          * @param userName User name
80          */
81         void setUserName (final String userName);
82
83         /**
84          * Getter for unencrypted user password
85          * <p>
86          * @return Unencrypted user password
87          */
88         String getUserPassword ();
89
90         /**
91          * Setter for unencrypted user password
92          * <p>
93          * @param userPassword Unencrypted user password
94          */
95         void setUserPassword (final String userPassword);
96
97         /**
98          * Getter for unencrypted user password repeated
99          * <p>
100          * @return Unencrypted user password repeated
101          */
102         String getUserPasswordRepeat ();
103
104         /**
105          * Setter for unencrypted user password repeated
106          * <p>
107          * @param userPasswordRepeat Unencrypted user password repeated
108          */
109         void setUserPasswordRepeat (final String userPasswordRepeat);
110
111 }