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