]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
Continued with refacturing:
[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          * Getter for user name
66          * <p>
67          * @return User name
68          */
69         String getUserName ();
70
71         /**
72          * Setter for user name
73          * <p>
74          * @param userName User name
75          */
76         void setUserName (final String userName);
77
78         /**
79          * Getter for unencrypted user password
80          * <p>
81          * @return Unencrypted user password
82          */
83         String getUserPassword ();
84
85         /**
86          * Setter for unencrypted user password
87          * <p>
88          * @param userPassword Unencrypted user password
89          */
90         void setUserPassword (final String userPassword);
91
92         /**
93          * Getter for unencrypted user password repeated
94          * <p>
95          * @return Unencrypted user password repeated
96          */
97         String getUserPasswordRepeat ();
98
99         /**
100          * Setter for unencrypted user password repeated
101          * <p>
102          * @param userPasswordRepeat Unencrypted user password repeated
103          */
104         void setUserPasswordRepeat (final String userPasswordRepeat);
105
106 }