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.cellphone.DialableCellphoneNumber;
24 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
25 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
26 import org.mxchange.jusercore.model.user.User;
29 * An interface for user beans
31 * @author Roland Haeder<roland@mxchange.org>
33 public interface UserWebController extends Serializable {
36 * Adds user's name and email address to bean's internal list
38 * @param user User instance
40 public void addUserNameEmailAddress (final User user);
43 * Clears all data in this bean
45 public void clearData ();
48 * Copies given user into the controller
50 * @param user User instance
52 public void copyUser (final User user);
55 * Creates an instance from all properties
57 * @return A user instance
59 public User createUserInstance ();
62 * Getter for birth day
66 public Date getBirthday ();
69 * Setter for birth day
71 * @param birthday Birth day
73 public void setBirthday (final Date birthday);
78 * @return the cellphoneNumber
80 public DialableCellphoneNumber getCellphoneNumber ();
85 * @param cellphoneNumber the cellphoneNumber to set
87 public void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
94 public String getCity ();
99 * @param city the city to set
101 public void setCity (final String city);
104 * Getter for comments
108 public String getComment ();
113 * @param comment Comments
115 public void setComment (final String comment);
118 * Getter for country instance
120 * @return Country instance
122 public Country getCountry ();
125 * Setter for country instance
127 * @param country Country instance
129 public void setCountry (final Country country);
132 * Getter for email address
134 * @return Email address
136 public String getEmailAddress ();
139 * Setter for email address
141 * @param emailAddress Email address
143 public void setEmailAddress (final String emailAddress);
146 * Getter for email address, repeated
148 * @return the emailAddress, repeated
150 public String getEmailAddressRepeat ();
153 * Setter for email address repeated
155 * @param emailAddressRepeat the emailAddress to set
157 public void setEmailAddressRepeat (final String emailAddressRepeat);
162 * @return the familyName
164 public String getFamilyName ();
169 * @param familyName the familyName to set
171 public void setFamilyName (final String familyName);
176 * @return the faxNumber
178 public DialableFaxNumber getFaxNumber ();
183 * @param faxNumber the faxNumber to set
185 public void setFaxNumber (final DialableFaxNumber faxNumber);
190 * @return the first name
192 public String getFirstName ();
197 * @param firstName the first name to set
199 public void setFirstName (final String firstName);
202 * Gender of the contact
206 public Gender getGender ();
209 * Gender of the contact
211 * @param gender the gender to set
213 public void setGender (final Gender gender);
218 * @return the houseNumber
220 public Short getHouseNumber ();
225 * @param houseNumber the houseNumber to set
227 public void setHouseNumber (final Short houseNumber);
232 * @return the phoneNumber
234 public DialableLandLineNumber getPhoneNumber ();
239 * @param phoneNumber the phoneNumber to set
241 public void setPhoneNumber (final DialableLandLineNumber phoneNumber);
248 public String getStreet ();
253 * @param street the street to set
255 public void setStreet (final String street);
262 public Long getUserId ();
267 * @param userId User id
269 public void setUserId (final Long userId);
272 * Getter for user name
276 public String getUserName ();
279 * Setter for user name
281 * @param userName User name
283 public void setUserName (final String userName);
286 * Getter for unencrypted user password
288 * @return Unencrypted user password
290 public String getUserPassword ();
293 * Setter for unencrypted user password
295 * @param userPassword Unencrypted user password
297 public void setUserPassword (final String userPassword);
300 * Getter for unencrypted user password repeated
302 * @return Unencrypted user password repeated
304 public String getUserPasswordRepeat ();
307 * Setter for unencrypted user password repeated
309 * @param userPasswordRepeat Unencrypted user password repeated
311 public void setUserPasswordRepeat (final String userPasswordRepeat);
316 * @return the zipCode
318 public Integer getZipCode ();
323 * @param zipCode the zipCode to set
325 public void setZipCode (final Integer zipCode);
328 * Checks whether user instance's email address is used
330 * @param user User instance's email address to check
332 * @return Whether it is already used
334 public boolean isEmailAddressRegistered (final User user);
337 * Checks whether all required personal data is set
339 * @return Whether the required personal data is set
341 public boolean isRequiredPersonalDataSet ();
344 * Checks whether same email addresses have been entered
346 * @return Whether same email addresses have been entered
348 public boolean isSameEmailAddressEntered ();
351 * Checks whether same passwords has been entered
353 * @return Whether same passwords has been entered
355 public boolean isSamePasswordEntered ();
358 * Checks whether given user instance's name is used
360 * @param user User instance's name to check
362 * @return Whether it is already used
364 public boolean isUserNameRegistered (final User user);