2 * Copyright (C) 2016 Roland Haeder
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.user;
19 import java.io.Serializable;
20 import java.util.Date;
21 import java.util.List;
22 import org.mxchange.jcontacts.contact.gender.Gender;
23 import org.mxchange.jcountry.data.Country;
24 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
25 import org.mxchange.jusercore.exceptions.UserNotFoundException;
26 import org.mxchange.jusercore.model.user.User;
29 * An interface for user beans
31 * @author Roland Haeder<roland@mxchange.org>
33 public interface JobsAdminUserWebSessionController extends Serializable {
36 * Tries to lookup user by given id number. If the user is not found or the
37 * account status is not CONFIRMED proper exceptions are thrown.
39 * @param userId User id
41 * @return User instance
43 * @throws UserNotFoundException If the user is not found
45 User lookupUserById (final Long userId) throws UserNotFoundException;
50 * @return A list of all public user profiles
52 List<User> allUsers ();
55 * Checks whether users are registered
57 * @return Whether users are registered
62 * Adds user instance to database by preparing a complete user instance and
63 * sending it to the EJB. The data set in the controller is being verified,
64 * e.g. if the user name or email address is not used yet.
69 * Getter for birth day
76 * Setter for birth day
78 * @param birthday Birth day
80 void setBirthday (final Date birthday);
83 * Getter for ellphone number's carrier
85 * @return Cellphone number's carrier
87 MobileProvider getCellphoneCarrier ();
90 * Setter for cellphone number's carrier prefix
92 * @param cellphoneCarrier Cellphone number's carrier prefix
94 void setCellphoneCarrier (final MobileProvider cellphoneCarrier);
97 * Getter for ellphone number
99 * @return Cellphone number
101 Long getCellphoneNumber ();
104 * Setter for ellphone number
106 * @param cellphoneNumber Cellphone number
108 void setCellphoneNumber (final Long cellphoneNumber);
120 * @param city the city to set
122 void setCity (final String city);
125 * Getter for comments
129 String getComment ();
134 * @param comment Comments
136 void setComment (final String comment);
139 * Getter for country instance
141 * @return Country instance
143 Country getCountry ();
146 * Setter for country instance
148 * @param country Country instance
150 void setCountry (final Country country);
153 * Getter for email address
155 * @return Email address
157 String getEmailAddress ();
160 * Setter for email address
162 * @param emailAddress Email address
164 void setEmailAddress (final String emailAddress);
169 * @return the familyName
171 String getFamilyName ();
176 * @param familyName the familyName to set
178 void setFamilyName (final String familyName);
181 * Getter for fax number's area code
183 * @return Fax number's area code
185 Integer getFaxAreaCode ();
188 * Setter for fax number's area code
190 * @param faxAreaCode Fax number's area code
192 void setFaxAreaCode (final Integer faxAreaCode);
195 * Getter for fax's country instance
197 * @return Fax' country instance
199 Country getFaxCountry ();
202 * Setter for fax's country instance
204 * @param faxCountry Fax' country instance
206 void setFaxCountry (final Country faxCountry);
209 * Getter for fax number
213 Long getFaxNumber ();
216 * Setter for fax number
218 * @param faxNumber Fax number
220 void setFaxNumber (final Long faxNumber);
225 * @return the first name
227 String getFirstName ();
232 * @param firstName the first name to set
234 void setFirstName (final String firstName);
237 * Gender of the contact
244 * Gender of the contact
246 * @param gender the gender to set
248 void setGender (final Gender gender);
253 * @return the houseNumber
255 Short getHouseNumber ();
260 * @param houseNumber the houseNumber to set
262 void setHouseNumber (final Short houseNumber);
265 * Getter for phone number's area code
267 * @return Phone number's area code
269 Integer getPhoneAreaCode ();
272 * Setter for phone number's area code
274 * @param phoneAreaCode Phone number's area code
276 void setPhoneAreaCode (final Integer phoneAreaCode);
279 * Getter for phone number's country instance
281 * @return Phone number's country instance
283 Country getPhoneCountry ();
286 * Setter for phone number's country instance
288 * @param phoneCountry Phone number's country instance
290 void setPhoneCountry (final Country phoneCountry);
293 * Getter for phone number
295 * @return Phone number
297 Long getPhoneNumber ();
300 * Setter for phone number
302 * @param phoneNumber Phone number
304 void setPhoneNumber (final Long phoneNumber);
316 * @param street the street to set
318 void setStreet (final String street);
321 * Getter for user name
325 String getUserName ();
328 * Setter for user name
330 * @param userName User name
332 void setUserName (final String userName);
335 * Getter for unencrypted user password
337 * @return Unencrypted user password
339 String getUserPassword ();
342 * Setter for unencrypted user password
344 * @param userPassword Unencrypted user password
346 void setUserPassword (final String userPassword);
349 * Getter for unencrypted user password repeated
351 * @return Unencrypted user password repeated
353 String getUserPasswordRepeat ();
356 * Setter for unencrypted user password repeated
358 * @param userPasswordRepeat Unencrypted user password repeated
360 void setUserPasswordRepeat (final String userPasswordRepeat);
365 * @return the zipCode
367 Integer getZipCode ();
372 * @param zipCode the zipCode to set
374 void setZipCode (final Integer zipCode);