]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java
Rewrites:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / login / PizzaUserLoginWebSessionController.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.pizzaapplication.beans.login;
18
19 import java.io.Serializable;
20 import org.mxchange.jusercore.model.user.User;
21
22 /**
23  * An interface for registration web controllers
24  * <p>
25  * @author Roland Haeder<roland@mxchange.org>
26  */
27 public interface PizzaUserLoginWebSessionController extends Serializable {
28
29         /**
30          * Getter for template type
31          * <p>
32          * @return Template type
33          */
34         String getTemplateType ();
35
36         /**
37          * Setter for template type
38          * <p>
39          * @param templateType Template type
40          */
41         void setTemplateType (final String templateType);
42
43         /**
44          * Logins the user, if the account is found, confirmed and unlocked.
45          * <p>
46          * @return Redirect target
47          */
48         String doLogin ();
49
50         /**
51          * Getter for logged-in user instance
52          * <p>
53          * @return Logged-in user instance
54          */
55         User getLoggedInUser ();
56
57         /**
58          * Setter for logged-in user instance
59          * <p>
60          * @param loggedInUser Logged-in user instance
61          */
62         void setLoggedInUser (final User loggedInUser);
63
64         /**
65          * Checks whether the user is logged-in
66          * <p>
67          * @return Whether the user is logged-in
68          */
69         boolean isUserLoggedIn ();
70
71         /**
72          * Is this truly a guest?
73          * <p>
74          * @return Whether the user is truly a guest
75          */
76         boolean isGuest ();
77
78         /**
79          * Whether the currently logged-in user is invisible
80          * <p>
81          * @return Whether the currently logged-in user is invisible
82          */
83         boolean isInvisible ();
84
85         /**
86          * Setter for current password (clear text)
87          * <p>
88          * @param currentPassword Current password
89          */
90         void setCurrentPassword (final String currentPassword);
91
92         /**
93          * Getter for current password (clear text)
94          * <p>
95          * @return Current password
96          */
97         String getCurrentPassword ();
98
99         /**
100          * Checks whether the (previously entered) current password matches with from
101          * the user instance.
102          * <p>
103          * @return If current password matches
104          */
105         boolean ifCurrentPasswordMatches ();
106 }