]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java
Please cherry-pick:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / contact / PizzaAdminContactWebRequestController.java
1 /*
2  * Copyright (C) 2016 Roland Häder
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.contact;
18
19 import java.io.Serializable;
20 import java.util.Date;
21 import javax.ejb.Local;
22 import org.mxchange.jcontacts.contact.Contact;
23 import org.mxchange.jcontacts.contact.gender.Gender;
24 import org.mxchange.jcountry.data.Country;
25 import org.mxchange.jphone.phonenumbers.DialableNumber;
26 import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
27 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
28
29 /**
30  * Administrative interface for user beans
31  * <p>
32  * @author Roland Häder<roland@mxchange.org>
33  */
34 @Local
35 public interface PizzaAdminContactWebRequestController extends Serializable {
36
37         /**
38          * Adds contact data to database and redirects on success. If the contact is
39          * already found, a proper exception is thrown.
40          * <p>
41          * @return Redirect outcome
42          */
43         String addContact ();
44
45         /**
46          * Creates an instance from contact data
47          * <p>
48          * @return New contact instance
49          */
50         Contact createContactInstance ();
51
52         /**
53          * Copies given contact's data to this controller
54          * <p>
55          * @param contact Contact instance
56          */
57         void copyContactToController (final Contact contact);
58
59         /**
60          * Edits currently loaded contact's data in database.
61          * <p>
62          * @return Redirect outcome
63          */
64         String editContactData ();
65
66         /**
67          * Getter for cellphone id
68          * <p>
69          * @return Mobile id
70          */
71         Long getMobileId ();
72
73         /**
74          * Setter for cellphone id
75          * <p>
76          * @param cellphoneId Mobile id
77          */
78         void setMobileId (final Long cellphoneId);
79
80         /**
81          * Getter for fax id
82          * <p>
83          * @return Fax id
84          */
85         Long getFaxId ();
86
87         /**
88          * Setter for fax id
89          * <p>
90          * @param faxId Fax id
91          */
92         void setFaxId (final Long faxId);
93
94         /**
95          * Getter for land-line id
96          * <p>
97          * @return Land-line id
98          */
99         Long getLandLineId ();
100
101         /**
102          * Setter for land-line id
103          * <p>
104          * @param landLineId Land-line id
105          */
106         void setLandLineId (final Long landLineId);
107
108         /**
109          * Getter for birth day
110          * <p>
111          * @return Birth day
112          */
113         Date getBirthday ();
114
115         /**
116          * Setter for birth day
117          * <p>
118          * @param birthday Birth day
119          */
120         void setBirthday (final Date birthday);
121
122         /**
123          * Getter for ellphone number's carrier
124          * <p>
125          * @return Mobile number's carrier
126          */
127         MobileProvider getMobileProvider ();
128
129         /**
130          * Setter for cellphone number's carrier prefix
131          * <p>
132          * @param cellphoneCarrier Mobile number's carrier prefix
133          */
134         void setMobileProvider (final MobileProvider cellphoneCarrier);
135
136         /**
137          * Getter for ellphone number
138          * <p>
139          * @return Mobile number
140          */
141         Long getMobileNumber ();
142
143         /**
144          * Setter for ellphone number
145          * <p>
146          * @param mobileNumber Mobile number
147          */
148         void setMobileNumber (final Long mobileNumber);
149
150         /**
151          * City
152          * <p>
153          * @return the city
154          */
155         String getCity ();
156
157         /**
158          * City
159          * <p>
160          * @param city the city to set
161          */
162         void setCity (final String city);
163
164         /**
165          * Getter for comments
166          * <p>
167          * @return Comments
168          */
169         String getComment ();
170
171         /**
172          * Setter for comment
173          * <p>
174          * @param comment Comments
175          */
176         void setComment (final String comment);
177
178         /**
179          * Getter for contact id
180          * <p>
181          * @return Contact id
182          */
183         Long getContactId ();
184
185         /**
186          * Setter for contact id
187          * <p>
188          * @param contactId Contact id
189          */
190         void setContactId (final Long contactId);
191
192         /**
193          * Getter for country instance
194          * <p>
195          * @return Country instance
196          */
197         Country getCountry ();
198
199         /**
200          * Setter for country instance
201          * <p>
202          * @param country Country instance
203          */
204         void setCountry (final Country country);
205
206         /**
207          * Getter for email address
208          * <p>
209          * @return Email address
210          */
211         String getEmailAddress ();
212
213         /**
214          * Setter for email address
215          * <p>
216          * @param emailAddress Email address
217          */
218         void setEmailAddress (final String emailAddress);
219
220         /**
221          * Family name
222          * <p>
223          * @return the familyName
224          */
225         String getFamilyName ();
226
227         /**
228          * Family name
229          * <p>
230          * @param familyName the familyName to set
231          */
232         void setFamilyName (final String familyName);
233
234         /**
235          * Getter for fax number's area code
236          * <p>
237          * @return Fax number's area code
238          */
239         Integer getFaxAreaCode ();
240
241         /**
242          * Setter for fax number's area code
243          * <p>
244          * @param faxAreaCode Fax number's area code
245          */
246         void setFaxAreaCode (final Integer faxAreaCode);
247
248         /**
249          * Getter for fax's country instance
250          * <p>
251          * @return Fax' country instance
252          */
253         Country getFaxCountry ();
254
255         /**
256          * Setter for fax's country instance
257          * <p>
258          * @param faxCountry Fax' country instance
259          */
260         void setFaxCountry (final Country faxCountry);
261
262         /**
263          * Getter for fax number
264          * <p>
265          * @return Fax number
266          */
267         Long getFaxNumber ();
268
269         /**
270          * Setter for fax number
271          * <p>
272          * @param faxNumber Fax number
273          */
274         void setFaxNumber (final Long faxNumber);
275
276         /**
277          * First name
278          * <p>
279          * @return the first name
280          */
281         String getFirstName ();
282
283         /**
284          * First name
285          * <p>
286          * @param firstName the first name to set
287          */
288         void setFirstName (final String firstName);
289
290         /**
291          * Gender of the contact
292          * <p>
293          * @return the gender
294          */
295         Gender getGender ();
296
297         /**
298          * Gender of the contact
299          * <p>
300          * @param gender the gender to set
301          */
302         void setGender (final Gender gender);
303
304         /**
305          * House number
306          * <p>
307          * @return the houseNumber
308          */
309         Short getHouseNumber ();
310
311         /**
312          * House number
313          * <p>
314          * @param houseNumber the houseNumber to set
315          */
316         void setHouseNumber (final Short houseNumber);
317
318         /**
319          * Getter for house number extension, example: 123a 'a' is then the
320          * extension and 123 is the house number.
321          * <p>
322          * @return House number extension
323          */
324         String getHouseNumberExtension ();
325
326         /**
327          * Setter for house number extension
328          * <p>
329          * @param houseNumberExtension House number extension
330          */
331         void setHouseNumberExtension (final String houseNumberExtension);
332
333         /**
334          * Getter for phone number's area code
335          * <p>
336          * @return Phone number's area code
337          */
338         Integer getLandLineAreaCode ();
339
340         /**
341          * Setter for phone number's area code
342          * <p>
343          * @param phoneAreaCode Phone number's area code
344          */
345         void setLandLineAreaCode (final Integer phoneAreaCode);
346
347         /**
348          * Getter for phone number's country instance
349          * <p>
350          * @return Phone number's country instance
351          */
352         Country getLandLineCountry ();
353
354         /**
355          * Setter for phone number's country instance
356          * <p>
357          * @param phoneCountry Phone number's country instance
358          */
359         void setLandLineCountry (final Country phoneCountry);
360
361         /**
362          * Getter for phone number
363          * <p>
364          * @return Phone number
365          */
366         Long getLandLineNumber ();
367
368         /**
369          * Setter for phone number
370          * <p>
371          * @param phoneNumber Phone number
372          */
373         void setLandLineNumber (final Long phoneNumber);
374
375         /**
376          * Street
377          * <p>
378          * @return the street
379          */
380         String getStreet ();
381
382         /**
383          * Street
384          * <p>
385          * @param street the street to set
386          */
387         void setStreet (final String street);
388
389         /**
390          * Getter for title
391          * <p>
392          * @return title
393          */
394         String getTitle ();
395
396         /**
397          * Setter for title
398          * <p>
399          * @param title Title
400          */
401         void setTitle (final String title);
402
403         /**
404          * ZIP code
405          * <p>
406          * @return the zipCode
407          */
408         Integer getZipCode ();
409
410         /**
411          * ZIP code
412          * <p>
413          * @param zipCode the zipCode to set
414          */
415         void setZipCode (final Integer zipCode);
416
417         /**
418          * Getter for controller type
419          * <p>
420          * @return controller type
421          */
422         String getControllerType ();
423
424         /**
425          * Setter for controller type
426          * <p>
427          * @param controllerType Controller type
428          * <p>
429          * @deprecated Don't use this method
430          */
431         @Deprecated
432         void setControllerType (final String controllerType);
433
434         /**
435          * Returns a text respresentation of given phone number or null if not set.
436          * <p>
437          * @param phoneNumber Phone number
438          * <p>
439          * @return Text respresentation or null
440          */
441         String generatePhoneNumber (final DialableNumber phoneNumber);
442
443         /**
444          * Returns a text representation of given cellphone number or null if not
445          * set.
446          * <p>
447          * @param mobileNumber Mobile number
448          * <p>
449          * @return Text respresentation or null
450          */
451         String generateMobileNumber (final DialableMobileNumber mobileNumber);
452
453         /**
454          * Checks/returns whether the gender/salutation is required for this
455          * controller.
456          * <p>
457          * @return Whether gender is required
458          */
459         boolean isGenderRequired ();
460
461 }