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