2 * Copyright (C) 2015 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (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 General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.addressbook.beans.user;
19 import java.io.Serializable;
20 import java.util.Date;
21 import org.mxchange.jcontacts.contact.gender.Gender;
22 import org.mxchange.jcountry.data.Country;
23 import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
24 import org.mxchange.jusercore.model.user.User;
27 * An interface for user beans
29 * @author Roland Haeder<roland@mxchange.org>
31 public interface UserWebController extends Serializable {
34 * Adds user's name and email address to bean's internal list
36 * @param user User instance
38 public void addUserNameEmailAddress (final User user);
41 * Clears all data in this bean
43 public void clearData ();
46 * Copies given user into the controller
48 * @param user User instance
50 public void copyUser (final User user);
53 * Creates an instance from all properties
55 * @return A user instance
57 public User createUserInstance ();
60 * Getter for birth day
64 public Date getBirthday ();
67 * Setter for birth day
69 * @param birthday Birth day
71 public void setBirthday (final Date birthday);
74 * Getter for ellphone number's carrier
76 * @return Cellphone number's carrier
78 public SmsProvider getCellphoneCarrier ();
81 * Setter for cellphone number's carrier prefix
83 * @param cellphoneCarrier Cellphone number's carrier prefix
85 public void setCellphoneCarrier (final SmsProvider cellphoneCarrier);
88 * Getter for ellphone number
90 * @return Cellphone number
92 public Long getCellphoneNumber ();
95 * Setter for ellphone number
97 * @param cellphoneNumber Cellphone number
99 public void setCellphoneNumber (final Long cellphoneNumber);
106 public String getCity ();
111 * @param city the city to set
113 public void setCity (final String city);
116 * Getter for comments
120 public String getComment ();
125 * @param comment Comments
127 public void setComment (final String comment);
130 * Getter for country instance
132 * @return Country instance
134 public Country getCountry ();
137 * Setter for country instance
139 * @param country Country instance
141 public void setCountry (final Country country);
144 * Getter for email address
146 * @return Email address
148 public String getEmailAddress ();
151 * Setter for email address
153 * @param emailAddress Email address
155 public void setEmailAddress (final String emailAddress);
158 * Getter for email address, repeated
160 * @return the emailAddress, repeated
162 public String getEmailAddressRepeat ();
165 * Setter for email address repeated
167 * @param emailAddressRepeat the emailAddress to set
169 public void setEmailAddressRepeat (final String emailAddressRepeat);
174 * @return the familyName
176 public String getFamilyName ();
181 * @param familyName the familyName to set
183 public void setFamilyName (final String familyName);
186 * Getter for fax number's area code
188 * @return Fax number's area code
190 public Integer getFaxAreaCode ();
193 * Setter for fax number's area code
195 * @param faxAreaCode Fax number's area code
197 public void setFaxAreaCode (final Integer faxAreaCode);
200 * Getter for fax's country instance
202 * @return Fax' country instance
204 public Country getFaxCountry ();
207 * Setter for fax's country instance
209 * @param faxCountry Fax' country instance
211 public void setFaxCountry (final Country faxCountry);
214 * Getter for fax number
218 public Long getFaxNumber ();
221 * Setter for fax number
223 * @param faxNumber Fax number
225 public void setFaxNumber (final Long faxNumber);
230 * @return the first name
232 public String getFirstName ();
237 * @param firstName the first name to set
239 public void setFirstName (final String firstName);
242 * Gender of the contact
246 public Gender getGender ();
249 * Gender of the contact
251 * @param gender the gender to set
253 public void setGender (final Gender gender);
258 * @return the houseNumber
260 public Short getHouseNumber ();
265 * @param houseNumber the houseNumber to set
267 public void setHouseNumber (final Short houseNumber);
270 * Getter for phone number's area code
272 * @return Phone number's area code
274 public Integer getPhoneAreaCode ();
277 * Setter for phone number's area code
279 * @param phoneAreaCode Phone number's area code
281 public void setPhoneAreaCode (final Integer phoneAreaCode);
284 * Getter for phone number's country instance
286 * @return Phone number's country instance
288 public Country getPhoneCountry ();
291 * Setter for phone number's country instance
293 * @param phoneCountry Phone number's country instance
295 public void setPhoneCountry (final Country phoneCountry);
298 * Getter for phone number
300 * @return Phone number
302 public Long getPhoneNumber ();
305 * Setter for phone number
307 * @param phoneNumber Phone number
309 public void setPhoneNumber (final Long phoneNumber);
316 public String getStreet ();
321 * @param street the street to set
323 public void setStreet (final String street);
330 public Long getUserId ();
335 * @param userId User id
337 public void setUserId (final Long userId);
340 * Getter for user name
344 public String getUserName ();
347 * Setter for user name
349 * @param userName User name
351 public void setUserName (final String userName);
354 * Getter for unencrypted user password
356 * @return Unencrypted user password
358 public String getUserPassword ();
361 * Setter for unencrypted user password
363 * @param userPassword Unencrypted user password
365 public void setUserPassword (final String userPassword);
368 * Getter for unencrypted user password repeated
370 * @return Unencrypted user password repeated
372 public String getUserPasswordRepeat ();
375 * Setter for unencrypted user password repeated
377 * @param userPasswordRepeat Unencrypted user password repeated
379 public void setUserPasswordRepeat (final String userPasswordRepeat);
384 * @return the zipCode
386 public Integer getZipCode ();
391 * @param zipCode the zipCode to set
393 public void setZipCode (final Integer zipCode);
396 * Checks whether user instance's email address is used
398 * @param user User instance's email address to check
400 * @return Whether it is already used
402 public boolean isEmailAddressRegistered (final User user);
405 * Checks whether all required personal data is set
407 * @return Whether the required personal data is set
409 public boolean isRequiredPersonalDataSet ();
412 * Checks whether same email addresses have been entered
414 * @return Whether same email addresses have been entered
416 public boolean isSameEmailAddressEntered ();
419 * Checks whether same passwords has been entered
421 * @return Whether same passwords has been entered
423 public boolean isSamePasswordEntered ();
426 * Checks whether given user instance's name is used
428 * @param user User instance's name to check
430 * @return Whether it is already used
432 public boolean isUserNameRegistered (final User user);
435 * Checks whether a public user account is registered. This means that at
436 * least one user profile has its flag "public user profile" enabled.
438 * @return Whether at least one user has a public profile
440 public boolean isPublicUserRegistered ();