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