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