]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java
added missing language i18n strings + show logout form only to logged-in users ...
[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 getBaseTemplatePathName ();
35
36         /**
37          * Setter for template type
38          * <p>
39          * @param baseTemplatePathName Template type
40          */
41         void setBaseTemplatePathName (final String baseTemplatePathName);
42
43         /**
44          * Logout for administrator area. If a logged-in user instance exists, it is
45          * being logged-out, too.
46          * <p>
47          * @return Outcome (should be redirected)
48          */
49         String doAdminLogout ();
50
51         /**
52          * Logins the user, if the account is found, confirmed and unlocked.
53          * <p>
54          * @return Redirect target
55          */
56         String doUserLogin ();
57
58         /**
59          * Logout for current user by invalidating the current session.
60          * <p>
61          * @return Outcome (should be redirected)
62          */
63         String doUserLogout ();
64
65         /**
66          * Getter for logged-in user instance
67          * <p>
68          * @return Logged-in user instance
69          */
70         User getLoggedInUser ();
71
72         /**
73          * Setter for logged-in user instance
74          * <p>
75          * @param loggedInUser Logged-in user instance
76          */
77         void setLoggedInUser (final User loggedInUser);
78
79         /**
80          * Checks whether the user is logged-in
81          * <p>
82          * @return Whether the user is logged-in
83          */
84         boolean isUserLoggedIn ();
85
86         /**
87          * Whether the currently logged-in user is invisible
88          * <p>
89          * @return Whether the currently logged-in user is invisible
90          */
91         boolean isInvisible ();
92
93         /**
94          * Setter for current password (clear text)
95          * <p>
96          * @param currentPassword Current password
97          */
98         void setCurrentPassword (final String currentPassword);
99
100         /**
101          * Getter for current password (clear text)
102          * <p>
103          * @return Current password
104          */
105         String getCurrentPassword ();
106
107         /**
108          * Checks whether the (previously entered) current password matches with from
109          * the user instance.
110          * <p>
111          * @return If current password matches
112          */
113         boolean ifCurrentPasswordMatches ();
114
115 }