]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
renamed to better names
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / user / JobsAdminUserWebRequestController.java
1 /*
2  * Copyright (C) 2016 Roland Häder
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.model.user.User;
21 import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent;
22
23 /**
24  * An interface for user beans
25  * <p>
26  * @author Roland Häder<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 ObservableUserRegisteredEvent 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          * Deletes given user account
48          * <p>
49          * @param user User instance to delete
50          * <p>
51          * @return Redirect outcome
52          */
53         String deleteUserData (final User user);
54
55         /**
56          * Edits currently loaded user's data in database.
57          * <p>
58          * @return Redirect outcome
59          */
60         String editUserData ();
61
62         /**
63          * Locks selected user's account. This method makes sure that a lock reason
64          * is provided that th user later can read on login attempts.
65          * <p>
66          * @param user User instance to be locked
67          * <p>
68          * @return Redirect outcome
69          */
70         String lockUserAccount (final User user);
71
72         /**
73          * Unlocks selected user's account. This method makes sure that the account
74          * is locked.
75          * <p>
76          * @param user User instance to be unlocked
77          * <p>
78          * @return Redirect outcome
79          */
80         String unlockUserAccount (final User user);
81
82         /**
83          * Getter for user name
84          * <p>
85          * @return User name
86          */
87         String getUserName ();
88
89         /**
90          * Setter for user name
91          * <p>
92          * @param userName User name
93          */
94         void setUserName (final String userName);
95
96         /**
97          * Getter for unencrypted user password
98          * <p>
99          * @return Unencrypted user password
100          */
101         String getUserPassword ();
102
103         /**
104          * Setter for unencrypted user password
105          * <p>
106          * @param userPassword Unencrypted user password
107          */
108         void setUserPassword (final String userPassword);
109
110         /**
111          * Getter for unencrypted user password repeated
112          * <p>
113          * @return Unencrypted user password repeated
114          */
115         String getUserPasswordRepeat ();
116
117         /**
118          * Setter for unencrypted user password repeated
119          * <p>
120          * @param userPasswordRepeat Unencrypted user password repeated
121          */
122         void setUserPasswordRepeat (final String userPasswordRepeat);
123
124         /**
125          * Getter for flag if user needs to change password
126          * <p>
127          * @return Flag if user needs to change password
128          */
129         Boolean getUserMustChangePassword ();
130
131         /**
132          * Setter for flag if user needs to change password
133          * <p>
134          * @param userMustChangePassword Flag if user needs to change password
135          */
136         void setUserMustChangePassword (final Boolean userMustChangePassword);
137
138         /**
139          * Getter for user lock reason
140          * <p>
141          * @return User lock reason
142          */
143         String getUserLockReason ();
144
145         /**
146          * Setter for user lock reason
147          * <p>
148          * @param userLockReason User lock reason
149          */
150         void setUserLockReason (final String userLockReason);
151
152         /**
153          * Getter for user delete reason
154          * <p>
155          * @return User delete reason
156          */
157         String getUserDeleteReason ();
158
159         /**
160          * Setter for user delete reason
161          * <p>
162          * @param userDeleteReason User delete reason
163          */
164         void setUserDeleteReason (final String userDeleteReason);
165
166 }