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.contact;
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;
30 * An administrative interface for user beans
32 * @author Roland Haeder<roland@mxchange.org>
34 public interface JobsAdminContactWebRequestController extends Serializable {
37 * Adds contact data to database and redirects on success. If the contact is
38 * already found, a proper exception is thrown.
40 * @return Redirect outcome
45 * Deletes contact data
47 * @param contact Contact instance to be deleted
49 * @return Redirect outcome
51 String deleteContactData (final Contact contact);
54 * Event observer for newly added users by adminstrator
56 * @param event Event being fired
58 void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
61 * Creates an instance from contact data
63 * @return New contact instance
65 Contact createContactInstance ();
68 * Copies given contact's data to this controller
70 * @param contact Contact instance
72 void copyContactToController (final Contact contact);
75 * Edits cuirrently loaded contact's data in database.
77 * @return Redirect outcome
79 String editContactData ();
82 * Getter for mobile id
86 Long getMobileNumberId ();
89 * Setter for mobile number id
91 * @param mobileNumberId Mobile number id
93 void setMobileNumberId (final Long mobileNumberId);
100 Long getFaxNumberId ();
103 * Setter for fax number id
105 * @param faxNumberId Fax number id
107 void setFaxNumberId (final Long faxNumberId);
110 * Getter for land-line id
112 * @return Land-line id
114 Long getLandLineId ();
117 * Setter for land-line id
119 * @param landLineId Land-line id
121 void setLandLineId (final Long landLineId);
124 * Getter for birth day
131 * Setter for birth day
133 * @param birthday Birth day
135 void setBirthday (final Date birthday);
138 * Getter for mobile provider
140 * @return mobile provider
142 MobileProvider getMobileProvider ();
145 * Setter for mobile provider
147 * @param mobileProvider Mobile provider
149 void setMobileProvider (final MobileProvider mobileProvider);
152 * Getter for mobile number
154 * @return Mobile number
156 Long getMobileNumber ();
159 * Setter for mobile number
161 * @param mobileNumber Mobile number
163 void setMobileNumber (final Long mobileNumber);
175 * @param city the city to set
177 void setCity (final String city);
180 * Getter for comments
184 String getComment ();
189 * @param comment Comments
191 void setComment (final String comment);
194 * Getter for contact id
198 Long getContactId ();
201 * Setter for contact id
203 * @param contactId Contact id
205 void setContactId (final Long contactId);
208 * Getter for country instance
210 * @return Country instance
212 Country getCountry ();
215 * Setter for country instance
217 * @param country Country instance
219 void setCountry (final Country country);
222 * Getter for email address
224 * @return Email address
226 String getEmailAddress ();
229 * Setter for email address
231 * @param emailAddress Email address
233 void setEmailAddress (final String emailAddress);
238 * @return the familyName
240 String getFamilyName ();
245 * @param familyName the familyName to set
247 void setFamilyName (final String familyName);
250 * Getter for fax number's area code
252 * @return Fax number's area code
254 Integer getFaxAreaCode ();
257 * Setter for fax number's area code
259 * @param faxAreaCode Fax number's area code
261 void setFaxAreaCode (final Integer faxAreaCode);
264 * Getter for fax's country instance
266 * @return Fax' country instance
268 Country getFaxCountry ();
271 * Setter for fax's country instance
273 * @param faxCountry Fax' country instance
275 void setFaxCountry (final Country faxCountry);
278 * Getter for fax number
282 Long getFaxNumber ();
285 * Setter for fax number
287 * @param faxNumber Fax number
289 void setFaxNumber (final Long faxNumber);
294 * @return the first name
296 String getFirstName ();
301 * @param firstName the first name to set
303 void setFirstName (final String firstName);
306 * Gender of the contact
313 * Gender of the contact
315 * @param gender the gender to set
317 void setGender (final Gender gender);
322 * @return the houseNumber
324 Short getHouseNumber ();
329 * @param houseNumber the houseNumber to set
331 void setHouseNumber (final Short houseNumber);
334 * Getter for house number extension, example: 123a 'a' is then the
335 * extension and 123 is the house number.
337 * @return House number extension
339 String getHouseNumberExtension ();
342 * Setter for house number extension
344 * @param houseNumberExtension House number extension
346 void setHouseNumberExtension (final String houseNumberExtension);
349 * Getter for phone number's area code
351 * @return Phone number's area code
353 Integer getLandLineAreaCode ();
356 * Setter for phone number's area code
358 * @param phoneAreaCode Phone number's area code
360 void setLandLineAreaCode (final Integer phoneAreaCode);
363 * Getter for phone number's country instance
365 * @return Phone number's country instance
367 Country getLandLineCountry ();
370 * Setter for phone number's country instance
372 * @param phoneCountry Phone number's country instance
374 void setLandLineCountry (final Country phoneCountry);
377 * Getter for phone number
379 * @return Phone number
381 Long getLandLineNumber ();
384 * Setter for phone number
386 * @param phoneNumber Phone number
388 void setLandLineNumber (final Long phoneNumber);
400 * @param street the street to set
402 void setStreet (final String street);
416 void setTitle (final String title);
421 * @return the zipCode
423 Integer getZipCode ();
428 * @param zipCode the zipCode to set
430 void setZipCode (final Integer zipCode);
433 * Getter for controller type
435 * @return controller type
437 String getControllerType ();
440 * Setter for controller type
442 * @param controllerType Controller type
444 * @deprecated Don't use this method
447 void setControllerType (final String controllerType);
450 * Returns a text respresentation of given phone number or null if not set.
452 * @param phoneNumber Phone number
454 * @return Text respresentation or null
456 String generatePhoneNumber (final DialableNumber phoneNumber);
459 * Returns a text representation of given mobile number or null if not
462 * @param mobileNumber Mobile number
464 * @return Text respresentation or null
466 String generateMobileNumber (final DialableMobileNumber mobileNumber);