]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionController.java
d24cf739a1f5fd473a7a9cf9c23111fdf5a59bc3
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / user / PizzaAdminUserWebSessionController.java
1 /*
2  * Copyright (C) 2016 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.pizzaapplication.beans.user;
18
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;
28
29 /**
30  * An interface for user beans
31  * <p>
32  * @author Roland Haeder<roland@mxchange.org>
33  */
34 public interface PizzaAdminUserWebSessionController extends Serializable {
35
36         /**
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.
39          * <p>
40          * @param userId User id
41          * <p>
42          * @return User instance
43          * <p>
44          * @throws UserNotFoundException If the user is not found
45          */
46         User lookupUserById (final Long userId) throws UserNotFoundException;
47
48         /**
49          * All users
50          * <p>
51          * @return A list of all public user profiles
52          */
53         List<User> allUsers ();
54
55         /**
56          * Checks whether users are registered
57          * <p>
58          * @return Whether users are registered
59          */
60         boolean hasUsers ();
61
62         /**
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.
66          */
67         void addUser ();
68
69         /**
70          * Getter for birth day
71          * <p>
72          * @return Birth day
73          */
74         Date getBirthday ();
75
76         /**
77          * Setter for birth day
78          * <p>
79          * @param birthday Birth day
80          */
81         void setBirthday (final Date birthday);
82
83         /**
84          * Getter for ellphone number's carrier
85          * <p>
86          * @return Cellphone number's carrier
87          */
88         SmsProvider getCellphoneCarrier ();
89
90         /**
91          * Setter for cellphone number's carrier prefix
92          * <p>
93          * @param cellphoneCarrier Cellphone number's carrier prefix
94          */
95         void setCellphoneCarrier (final SmsProvider cellphoneCarrier);
96
97         /**
98          * Getter for ellphone number
99          * <p>
100          * @return Cellphone number
101          */
102         Long getCellphoneNumber ();
103
104         /**
105          * Setter for ellphone number
106          * <p>
107          * @param cellphoneNumber Cellphone number
108          */
109         void setCellphoneNumber (final Long cellphoneNumber);
110
111         /**
112          * City
113          * <p>
114          * @return the city
115          */
116         String getCity ();
117
118         /**
119          * City
120          * <p>
121          * @param city the city to set
122          */
123         void setCity (final String city);
124
125         /**
126          * Getter for comments
127          * <p>
128          * @return Comments
129          */
130         String getComment ();
131
132         /**
133          * Setter for comment
134          * <p>
135          * @param comment Comments
136          */
137         void setComment (final String comment);
138
139         /**
140          * Getter for country instance
141          * <p>
142          * @return Country instance
143          */
144         Country getCountry ();
145
146         /**
147          * Setter for country instance
148          * <p>
149          * @param country Country instance
150          */
151         void setCountry (final Country country);
152
153         /**
154          * Getter for email address
155          * <p>
156          * @return Email address
157          */
158         String getEmailAddress ();
159
160         /**
161          * Setter for email address
162          * <p>
163          * @param emailAddress Email address
164          */
165         void setEmailAddress (final String emailAddress);
166
167         /**
168          * Family name
169          * <p>
170          * @return the familyName
171          */
172         String getFamilyName ();
173
174         /**
175          * Family name
176          * <p>
177          * @param familyName the familyName to set
178          */
179         void setFamilyName (final String familyName);
180
181         /**
182          * Getter for fax number's area code
183          * <p>
184          * @return Fax number's area code
185          */
186         Integer getFaxAreaCode ();
187
188         /**
189          * Setter for fax number's area code
190          * <p>
191          * @param faxAreaCode Fax number's area code
192          */
193         void setFaxAreaCode (final Integer faxAreaCode);
194
195         /**
196          * Getter for fax's country instance
197          * <p>
198          * @return Fax' country instance
199          */
200         Country getFaxCountry ();
201
202         /**
203          * Setter for fax's country instance
204          * <p>
205          * @param faxCountry Fax' country instance
206          */
207         void setFaxCountry (final Country faxCountry);
208
209         /**
210          * Getter for fax number
211          * <p>
212          * @return Fax number
213          */
214         Long getFaxNumber ();
215
216         /**
217          * Setter for fax number
218          * <p>
219          * @param faxNumber Fax number
220          */
221         void setFaxNumber (final Long faxNumber);
222
223         /**
224          * First name
225          * <p>
226          * @return the first name
227          */
228         String getFirstName ();
229
230         /**
231          * First name
232          * <p>
233          * @param firstName the first name to set
234          */
235         void setFirstName (final String firstName);
236
237         /**
238          * Gender of the contact
239          * <p>
240          * @return the gender
241          */
242         Gender getGender ();
243
244         /**
245          * Gender of the contact
246          * <p>
247          * @param gender the gender to set
248          */
249         void setGender (final Gender gender);
250
251         /**
252          * House number
253          * <p>
254          * @return the houseNumber
255          */
256         Short getHouseNumber ();
257
258         /**
259          * House number
260          * <p>
261          * @param houseNumber the houseNumber to set
262          */
263         void setHouseNumber (final Short houseNumber);
264
265         /**
266          * Getter for phone number's area code
267          * <p>
268          * @return Phone number's area code
269          */
270         Integer getPhoneAreaCode ();
271
272         /**
273          * Setter for phone number's area code
274          * <p>
275          * @param phoneAreaCode Phone number's area code
276          */
277         void setPhoneAreaCode (final Integer phoneAreaCode);
278
279         /**
280          * Getter for phone number's country instance
281          * <p>
282          * @return Phone number's country instance
283          */
284         Country getPhoneCountry ();
285
286         /**
287          * Setter for phone number's country instance
288          * <p>
289          * @param phoneCountry Phone number's country instance
290          */
291         void setPhoneCountry (final Country phoneCountry);
292
293         /**
294          * Getter for phone number
295          * <p>
296          * @return Phone number
297          */
298         Long getPhoneNumber ();
299
300         /**
301          * Setter for phone number
302          * <p>
303          * @param phoneNumber Phone number
304          */
305         void setPhoneNumber (final Long phoneNumber);
306
307         /**
308          * Street
309          * <p>
310          * @return the street
311          */
312         String getStreet ();
313
314         /**
315          * Street
316          * <p>
317          * @param street the street to set
318          */
319         void setStreet (final String street);
320
321         /**
322          * Getter for user id
323          * <p>
324          * @return User id
325          */
326         Long getUserId ();
327
328         /**
329          * Setter for user id
330          * <p>
331          * @param userId User id
332          */
333         void setUserId (final Long userId);
334
335         /**
336          * Getter for user name
337          * <p>
338          * @return User name
339          */
340         String getUserName ();
341
342         /**
343          * Setter for user name
344          * <p>
345          * @param userName User name
346          */
347         void setUserName (final String userName);
348
349         /**
350          * Getter for unencrypted user password
351          * <p>
352          * @return Unencrypted user password
353          */
354         String getUserPassword ();
355
356         /**
357          * Setter for unencrypted user password
358          * <p>
359          * @param userPassword Unencrypted user password
360          */
361         void setUserPassword (final String userPassword);
362
363         /**
364          * Getter for unencrypted user password repeated
365          * <p>
366          * @return Unencrypted user password repeated
367          */
368         String getUserPasswordRepeat ();
369
370         /**
371          * Setter for unencrypted user password repeated
372          * <p>
373          * @param userPasswordRepeat Unencrypted user password repeated
374          */
375         void setUserPasswordRepeat (final String userPasswordRepeat);
376
377         /**
378          * Getter for user profile mode
379          * <p>
380          * @return User profile mode
381          */
382         ProfileMode getUserProfileMode ();
383
384         /**
385          * Setter for user profile mode
386          * <p>
387          * @param userProfileMode User profile mode
388          */
389         void setUserProfileMode (final ProfileMode userProfileMode);
390
391         /**
392          * ZIP code
393          * <p>
394          * @return the zipCode
395          */
396         Integer getZipCode ();
397
398         /**
399          * ZIP code
400          * <p>
401          * @param zipCode the zipCode to set
402          */
403         void setZipCode (final Integer zipCode);
404
405 }