2 * Copyright (C) 2016 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.pizzaapplication.beans.login;
19 import java.io.Serializable;
20 import org.mxchange.jusercore.model.user.User;
23 * An interface for registration web controllers
25 * @author Roland Haeder<roland@mxchange.org>
27 public interface PizzaUserLoginWebSessionController extends Serializable {
30 * Getter for template type
32 * @return Template type
34 String getBaseTemplatePathName ();
37 * Setter for template type
39 * @param baseTemplatePathName Template type
41 void setBaseTemplatePathName (final String baseTemplatePathName);
44 * Logout for administrator area. If a logged-in user instance exists, it is
45 * being logged-out, too.
47 * @return Outcome (should be redirected)
49 String doAdminLogout ();
52 * Logins the user, if the account is found, confirmed and unlocked.
54 * @return Redirect target
56 String doUserLogin ();
59 * Logout for current user by invalidating the current session.
61 * @return Outcome (should be redirected)
63 String doUserLogout ();
66 * Getter for logged-in user instance
68 * @return Logged-in user instance
70 User getLoggedInUser ();
73 * Setter for logged-in user instance
75 * @param loggedInUser Logged-in user instance
77 void setLoggedInUser (final User loggedInUser);
80 * Checks whether the user is logged-in
82 * @return Whether the user is logged-in
84 boolean isUserLoggedIn ();
87 * Whether the currently logged-in user is invisible
89 * @return Whether the currently logged-in user is invisible
91 boolean isInvisible ();
94 * Setter for current password (clear text)
96 * @param currentPassword Current password
98 void setCurrentPassword (final String currentPassword);
101 * Getter for current password (clear text)
103 * @return Current password
105 String getCurrentPassword ();
108 * Checks whether the (previously entered) current password matches with from
111 * @return If current password matches
113 boolean ifCurrentPasswordMatches ();