]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
Continued with locking user accounts: (please cherry-pick)
[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 org.mxchange.jusercore.events.registration.UserRegisteredEvent;
21 import org.mxchange.jusercore.model.user.User;
22
23 /**
24  * An interface for user beans
25  * <p>
26  * @author Roland Haeder<roland@mxchange.org>
27  */
28 public interface JobsAdminUserWebRequestController extends Serializable {
29
30         /**
31          * Event observer for new user registrations
32          * <p>
33          * @param event User registration event
34          */
35         void afterRegistrationEvent (final UserRegisteredEvent event);
36
37         /**
38          * Adds user instance to database by preparing a complete user instance and
39          * sending it to the EJB. The data set in the controller is being verified,
40          * e.g. if the user name or email address is not used yet.
41          * <p>
42          * @return Redirect outcome
43          */
44         String addUser ();
45
46         /**
47          * Edits cuirrently loaded user's data in database.
48          * <p>
49          * @return Redirect outcome
50          */
51         String editUserData ();
52
53         /**
54          * Locks selected user's account. This method makes sure that a lock reason
55          * is provided that th user later can read on login attempts.
56          * <p>
57          * @param user User instance to be locked
58          * <p>
59          * @return Redirect outcome
60          */
61         String lockUserAccount (final User user);
62
63         /**
64          * Getter for user name
65          * <p>
66          * @return User name
67          */
68         String getUserName ();
69
70         /**
71          * Setter for user name
72          * <p>
73          * @param userName User name
74          */
75         void setUserName (final String userName);
76
77         /**
78          * Getter for unencrypted user password
79          * <p>
80          * @return Unencrypted user password
81          */
82         String getUserPassword ();
83
84         /**
85          * Setter for unencrypted user password
86          * <p>
87          * @param userPassword Unencrypted user password
88          */
89         void setUserPassword (final String userPassword);
90
91         /**
92          * Getter for unencrypted user password repeated
93          * <p>
94          * @return Unencrypted user password repeated
95          */
96         String getUserPasswordRepeat ();
97
98         /**
99          * Setter for unencrypted user password repeated
100          * <p>
101          * @param userPasswordRepeat Unencrypted user password repeated
102          */
103         void setUserPasswordRepeat (final String userPasswordRepeat);
104
105         /**
106          * Getter for flag if user needs to change password
107          * <p>
108          * @return Flag if user needs to change password
109          */
110         Boolean getUserMustChangePassword ();
111
112         /**
113          * Setter for flag if user needs to change password
114          * <p>
115          * @param userMustChangePassword Flag if user needs to change password
116          */
117         void setUserMustChangePassword (final Boolean userMustChangePassword);
118
119         /**
120          * Getter for user lock reason
121          * <p>
122          * @return User lock reason
123          */
124         String getUserLockReason ();
125
126         /**
127          * Setter for user lock reason
128          * <p>
129          * @param userLockReason User lock reason
130          */
131         void setUserLockReason (final String userLockReason);
132
133 }