]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
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 afterUserRegistrationEvent (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          * Unlocks selected user's account. This method makes sure that the account
65          * is locked.
66          * <p>
67          * @param user User instance to be unlocked
68          * <p>
69          * @return Redirect outcome
70          */
71         String unlockUserAccount (final User user);
72
73         /**
74          * Getter for user name
75          * <p>
76          * @return User name
77          */
78         String getUserName ();
79
80         /**
81          * Setter for user name
82          * <p>
83          * @param userName User name
84          */
85         void setUserName (final String userName);
86
87         /**
88          * Getter for unencrypted user password
89          * <p>
90          * @return Unencrypted user password
91          */
92         String getUserPassword ();
93
94         /**
95          * Setter for unencrypted user password
96          * <p>
97          * @param userPassword Unencrypted user password
98          */
99         void setUserPassword (final String userPassword);
100
101         /**
102          * Getter for unencrypted user password repeated
103          * <p>
104          * @return Unencrypted user password repeated
105          */
106         String getUserPasswordRepeat ();
107
108         /**
109          * Setter for unencrypted user password repeated
110          * <p>
111          * @param userPasswordRepeat Unencrypted user password repeated
112          */
113         void setUserPasswordRepeat (final String userPasswordRepeat);
114
115         /**
116          * Getter for flag if user needs to change password
117          * <p>
118          * @return Flag if user needs to change password
119          */
120         Boolean getUserMustChangePassword ();
121
122         /**
123          * Setter for flag if user needs to change password
124          * <p>
125          * @param userMustChangePassword Flag if user needs to change password
126          */
127         void setUserMustChangePassword (final Boolean userMustChangePassword);
128
129         /**
130          * Getter for user lock reason
131          * <p>
132          * @return User lock reason
133          */
134         String getUserLockReason ();
135
136         /**
137          * Setter for user lock reason
138          * <p>
139          * @param userLockReason User lock reason
140          */
141         void setUserLockReason (final String userLockReason);
142
143 }