]> git.mxchange.org Git - addressbook-war.git/blob - src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebRequestController.java
Don't cherry-pick:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / contact / AddressbookContactWebRequestController.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.addressbook.beans.contact;
18
19 import java.io.Serializable;
20 import org.mxchange.jcontacts.model.contact.Contact;
21
22 /**
23  * An interface for user beans
24  * <p>
25  * @author Roland Häder<roland@mxchange.org>
26  */
27 public interface AddressbookContactWebRequestController extends Serializable {
28
29         /**
30          * Minimum password length
31          */
32         public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
33
34         /**
35          * Getter for email address
36          * <p>
37          * @return Email address
38          */
39         String getEmailAddress ();
40
41         /**
42          * Clears both email address field
43          */
44         void clearEmailAddresses ();
45
46         /**
47          * Creates an instance from all properties
48          * <p>
49          * @return A contact instance
50          */
51         Contact createContactInstance ();
52
53         /**
54          * Checks whether contact instance's email address is used
55          * <p>
56          * @param contact Contact instance's email address to check
57          * <p>
58          * @return Whether it is already used
59          */
60         boolean isEmailAddressRegistered (final Contact contact);
61
62         /**
63          * Checks whether all required personal data is set
64          * <p>
65          * @return Whether the required personal data is set
66          */
67         boolean isRequiredPersonalDataSet ();
68
69         /**
70          * Checks whether all required personal data is set for changing them
71          * <p>
72          * @return Whether the required personal data is set
73          */
74         boolean isRequiredChangePersonalDataSet ();
75
76         /**
77          * Checks whether same email addresses have been entered
78          * <p>
79          * @return Whether same email addresses have been entered
80          */
81         boolean isSameEmailAddressEntered ();
82
83         /**
84          * Changes logged-in user's personal data if the current password matches
85          * and TAC + privacy statement has been accepted.
86          * <p>
87          * @return New target page
88          */
89         String doChangePersonalContactData ();
90
91         /**
92          * Checks whether the given email address is already registered. The email
93          * address should be validated by EmailAddressValidator before calling this
94          * method.
95          * <p>
96          * @param emailAddress Email address to check
97          * <p>
98          * @return Whether the email address is already registered
99          */
100         boolean isEmailAddressRegistered (final String emailAddress);
101
102 }