]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebRequestController.java
bcebc792c426f1fa1fd0644debedd4f29e5e7388
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / contact / PizzaContactWebRequestController.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.pizzaapplication.beans.contact;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.jcontacts.model.contact.Contact;
22
23 /**
24  * An interface for user beans
25  * <p>
26  * @author Roland Häder<roland@mxchange.org>
27  */
28 public interface PizzaContactWebRequestController extends Serializable {
29
30         /**
31          * Minimum password length
32          */
33         public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
34
35         /**
36          * Getter for email address
37          * <p>
38          * @return Email address
39          */
40         String getEmailAddress ();
41
42         /**
43          * Clears both email address field
44          */
45         void clearEmailAddresses ();
46
47         /**
48          * Returns a list of all found contacts
49          * <p>
50          * @return A list of all contacts.
51          */
52         List<Contact> allContacts ();
53
54         /**
55          * Updates all data from bean in given contact instance
56          * <p>
57          * @param userContact Contact instance to update
58          */
59         void updateContactDataFromController (final Contact userContact);
60
61         /**
62          * Creates an instance from all properties
63          * <p>
64          * @return A contact instance
65          */
66         Contact createContactInstance ();
67
68         /**
69          * Getter for controller type
70          * <p>
71          * @return controller type
72          */
73         String getControllerType ();
74
75         /**
76          * Setter for controller type
77          * <p>
78          * @param controllerType Controller type
79          * <p>
80          * @deprecated Don't use this method.
81          */
82         @Deprecated
83         void setControllerType (final String controllerType);
84
85         /**
86          * Checks whether contact instance's email address is used
87          * <p>
88          * @param contact Contact instance's email address to check
89          * <p>
90          * @return Whether it is already used
91          */
92         boolean isEmailAddressRegistered (final Contact contact);
93
94         /**
95          * Checks whether all required personal data is set
96          * <p>
97          * @return Whether the required personal data is set
98          */
99         boolean isRequiredPersonalDataSet ();
100
101         /**
102          * Checks whether all required personal data is set for changing them
103          * <p>
104          * @return Whether the required personal data is set
105          */
106         boolean isRequiredChangePersonalDataSet ();
107
108         /**
109          * Checks whether same email addresses have been entered
110          * <p>
111          * @return Whether same email addresses have been entered
112          */
113         boolean isSameEmailAddressEntered ();
114
115         /**
116          * Changes logged-in user's personal data if the current password matches
117          * and TAC + privacy statement has been accepted.
118          * <p>
119          * @return New target page
120          */
121         String doChangePersonalContactData ();
122
123 }