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.smsprovider.SmsProvider;
25 import org.mxchange.jusercore.exceptions.UserNotFoundException;
26 import org.mxchange.jusercore.model.user.User;
27 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
30 * An interface for user beans
32 * @author Roland Haeder<roland@mxchange.org>
34 public interface JobsAdminUserWebSessionController extends Serializable {
37 * Tries to lookup user by given id number. If the user is not found or the
38 * account status is not CONFIRMED proper exceptions are thrown.
40 * @param userId User id
42 * @return User instance
44 * @throws UserNotFoundException If the user is not found
46 User lookupUserById (final Long userId) throws UserNotFoundException;
51 * @return A list of all public user profiles
53 List<User> allUsers ();
56 * Checks whether users are registered
58 * @return Whether users are registered
63 * Adds user instance to database by preparing a complete user instance and
64 * sending it to the EJB. The data set in the controller is being verified,
65 * e.g. if the user name or email address is not used yet.
70 * Getter for birth day
77 * Setter for birth day
79 * @param birthday Birth day
81 void setBirthday (final Date birthday);
84 * Getter for ellphone number's carrier
86 * @return Cellphone number's carrier
88 SmsProvider getCellphoneCarrier ();
91 * Setter for cellphone number's carrier prefix
93 * @param cellphoneCarrier Cellphone number's carrier prefix
95 void setCellphoneCarrier (final SmsProvider cellphoneCarrier);
98 * Getter for ellphone number
100 * @return Cellphone number
102 Long getCellphoneNumber ();
105 * Setter for ellphone number
107 * @param cellphoneNumber Cellphone number
109 void setCellphoneNumber (final Long cellphoneNumber);
121 * @param city the city to set
123 void setCity (final String city);
126 * Getter for comments
130 String getComment ();
135 * @param comment Comments
137 void setComment (final String comment);
140 * Getter for country instance
142 * @return Country instance
144 Country getCountry ();
147 * Setter for country instance
149 * @param country Country instance
151 void setCountry (final Country country);
154 * Getter for email address
156 * @return Email address
158 String getEmailAddress ();
161 * Setter for email address
163 * @param emailAddress Email address
165 void setEmailAddress (final String emailAddress);
170 * @return the familyName
172 String getFamilyName ();
177 * @param familyName the familyName to set
179 void setFamilyName (final String familyName);
182 * Getter for fax number's area code
184 * @return Fax number's area code
186 Integer getFaxAreaCode ();
189 * Setter for fax number's area code
191 * @param faxAreaCode Fax number's area code
193 void setFaxAreaCode (final Integer faxAreaCode);
196 * Getter for fax's country instance
198 * @return Fax' country instance
200 Country getFaxCountry ();
203 * Setter for fax's country instance
205 * @param faxCountry Fax' country instance
207 void setFaxCountry (final Country faxCountry);
210 * Getter for fax number
214 Long getFaxNumber ();
217 * Setter for fax number
219 * @param faxNumber Fax number
221 void setFaxNumber (final Long faxNumber);
226 * @return the first name
228 String getFirstName ();
233 * @param firstName the first name to set
235 void setFirstName (final String firstName);
238 * Gender of the contact
245 * Gender of the contact
247 * @param gender the gender to set
249 void setGender (final Gender gender);
254 * @return the houseNumber
256 Short getHouseNumber ();
261 * @param houseNumber the houseNumber to set
263 void setHouseNumber (final Short houseNumber);
266 * Getter for phone number's area code
268 * @return Phone number's area code
270 Integer getPhoneAreaCode ();
273 * Setter for phone number's area code
275 * @param phoneAreaCode Phone number's area code
277 void setPhoneAreaCode (final Integer phoneAreaCode);
280 * Getter for phone number's country instance
282 * @return Phone number's country instance
284 Country getPhoneCountry ();
287 * Setter for phone number's country instance
289 * @param phoneCountry Phone number's country instance
291 void setPhoneCountry (final Country phoneCountry);
294 * Getter for phone number
296 * @return Phone number
298 Long getPhoneNumber ();
301 * Setter for phone number
303 * @param phoneNumber Phone number
305 void setPhoneNumber (final Long phoneNumber);
317 * @param street the street to set
319 void setStreet (final String street);
331 * @param userId User id
333 void setUserId (final Long userId);
336 * Getter for user name
340 String getUserName ();
343 * Setter for user name
345 * @param userName User name
347 void setUserName (final String userName);
350 * Getter for unencrypted user password
352 * @return Unencrypted user password
354 String getUserPassword ();
357 * Setter for unencrypted user password
359 * @param userPassword Unencrypted user password
361 void setUserPassword (final String userPassword);
364 * Getter for unencrypted user password repeated
366 * @return Unencrypted user password repeated
368 String getUserPasswordRepeat ();
371 * Setter for unencrypted user password repeated
373 * @param userPasswordRepeat Unencrypted user password repeated
375 void setUserPasswordRepeat (final String userPasswordRepeat);
378 * Getter for user profile mode
380 * @return User profile mode
382 ProfileMode getUserProfileMode ();
385 * Setter for user profile mode
387 * @param userProfileMode User profile mode
389 void setUserProfileMode (final ProfileMode userProfileMode);
394 * @return the zipCode
396 Integer getZipCode ();
401 * @param zipCode the zipCode to set
403 void setZipCode (final Integer zipCode);