]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestController.java
3f58bb01fc81fab934a42f02c6c4e713f8d6150a
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / contact / JobsContactWebRequestController.java
1 /*
2  * Copyright (C) 2016 - 2020 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.jjobs.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 JobsContactWebRequestController 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          * Getter for controller type
55          * <p>
56          * @return controller type
57          */
58         String getControllerType ();
59
60         /**
61          * Setter for controller type
62          * <p>
63          * @param controllerType Controller type
64          * <p>
65          * @deprecated Don't use this method.
66          */
67         @Deprecated
68         void setControllerType (final String controllerType);
69
70         /**
71          * Checks whether contact instance's email address is used
72          * <p>
73          * @param contact Contact instance's email address to check
74          * <p>
75          * @return Whether it is already used
76          */
77         boolean isEmailAddressRegistered (final Contact contact);
78
79         /**
80          * Checks whether all required personal data is set
81          * <p>
82          * @return Whether the required personal data is set
83          */
84         boolean isRequiredPersonalDataSet ();
85
86         /**
87          * Checks whether all required personal data is set for changing them
88          * <p>
89          * @return Whether the required personal data is set
90          */
91         boolean isRequiredChangePersonalDataSet ();
92
93         /**
94          * Checks whether same email addresses have been entered
95          * <p>
96          * @return Whether same email addresses have been entered
97          */
98         boolean isSameEmailAddressEntered ();
99
100         /**
101          * Changes logged-in user's personal data if the current password matches
102          * and TAC + privacy statement has been accepted.
103          * <p>
104          * @return New target page
105          */
106         String doChangePersonalContactData ();
107
108         /**
109          * Checks whether the given email address is already registered. The email
110          * address should be validated by EmailAddressValidator before calling this
111          * method.
112          * <p>
113          * @param emailAddress Email address to check
114          * <p>
115          * @return Whether the email address is already registered
116          */
117         boolean isEmailAddressRegistered (final String emailAddress);
118
119 }