2 * Copyright (C) 2016 - 2020 Free Software Foundation
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.jjobs.beans.contact;
19 import java.io.Serializable;
20 import org.mxchange.jcontacts.model.contact.Contact;
23 * An interface for user beans
25 * @author Roland Häder<roland@mxchange.org>
27 public interface JobsContactWebRequestController extends Serializable {
30 * Minimum password length
32 public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
35 * Getter for email address
37 * @return Email address
39 String getEmailAddress ();
42 * Clears both email address field
44 void clearEmailAddresses ();
47 * Creates an instance from all properties
49 * @return A contact instance
51 Contact createContactInstance ();
54 * Getter for controller type
56 * @return controller type
58 String getControllerType ();
61 * Setter for controller type
63 * @param controllerType Controller type
65 * @deprecated Don't use this method.
68 void setControllerType (final String controllerType);
71 * Checks whether contact instance's email address is used
73 * @param contact Contact instance's email address to check
75 * @return Whether it is already used
77 boolean isEmailAddressRegistered (final Contact contact);
80 * Checks whether all required personal data is set
82 * @return Whether the required personal data is set
84 boolean isRequiredPersonalDataSet ();
87 * Checks whether all required personal data is set for changing them
89 * @return Whether the required personal data is set
91 boolean isRequiredChangePersonalDataSet ();
94 * Checks whether same email addresses have been entered
96 * @return Whether same email addresses have been entered
98 boolean isSameEmailAddressEntered ();
101 * Changes logged-in user's personal data if the current password matches
102 * and TAC + privacy statement has been accepted.
104 * @return New target page
106 String doChangePersonalContactData ();
109 * Checks whether the given email address is already registered. The email
110 * address should be validated by EmailAddressValidator before calling this
113 * @param emailAddress Email address to check
115 * @return Whether the email address is already registered
117 boolean isEmailAddressRegistered (final String emailAddress);