]> git.mxchange.org Git - jfinancials-war.git/blob - src/java/org/mxchange/jfinancials/beans/user/list/FinancialsUserListWebViewController.java
Updated copyright year
[jfinancials-war.git] / src / java / org / mxchange / jfinancials / beans / user / list / FinancialsUserListWebViewController.java
1 /*
2  * Copyright (C) 2016 - 2022 Free Software Foundation
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.jfinancials.beans.user.list;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
22 import org.mxchange.jusercore.exceptions.UserNotFoundException;
23 import org.mxchange.jusercore.model.user.User;
24
25 /**
26  * An interface for user beans
27  * <p>
28  * @author Roland Häder<roland@mxchange.org>
29  */
30 public interface FinancialsUserListWebViewController extends Serializable {
31
32         /**
33          * Returns a user instance by given primary key. If not found, a proper
34          * exception is thrown.
35          * <p>
36          * @param userId User id
37          * <p>
38          * @return User instance
39          * <p>
40          * @throws UserNotFoundException If the user is not found
41          */
42         User findUserById (final Long userId) throws UserNotFoundException;
43
44         /**
45          * All users
46          * <p>
47          * @return A list of all public user profiles
48          */
49         List<User> getAllUsers ();
50
51         /**
52          * Checks if given user id exists
53          * <p>
54          * @param userId User id to check
55          * <p>
56          * @return Whether the user id exists
57          */
58         boolean ifUserIdExists (final Long userId);
59
60         /**
61          * Checks whether given user instance name is used
62          * <p>
63          * @param user User instance name to check
64          * <p>
65          * @return Whether it is already used
66          */
67         boolean isUserNameRegistered (final User user);
68
69         /**
70          * Tries to lookup user by given id number. If the user is not found or the
71          * account status is not CONFIRMED proper exceptions are thrown.
72          * <p>
73          * @param userId User id
74          * <p>
75          * @return User instance
76          * <p>
77          * @throws UserNotFoundException If the user is not found
78          */
79         User lookupUserById (final Long userId) throws UserNotFoundException;
80
81         /**
82          * Tries to lookup user by given email address. If the user is not found a
83          * proper exceptions is thrown.
84          * <p>
85          * @param emailAddress Email address
86          * <p>
87          * @return User instance
88          * <p>
89          * @throws UserEmailAddressNotFoundException If the user's email address is
90          * not found
91          */
92         User lookupUserByEmailAddress (final String emailAddress) throws UserEmailAddressNotFoundException;
93
94 }