2 * Copyright (C) 2016 Roland Häder
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;
29 * An administrative interface for user beans
31 * @author Roland Häder<roland@mxchange.org>
33 public interface JobsAdminContactWebRequestController extends Serializable {
36 * Adds contact data to database and redirects on success. If the contact is
37 * already found, a proper exception is thrown.
39 * @return Redirect outcome
44 * Creates an instance from contact data
46 * @return New contact instance
48 Contact createContactInstance ();
51 * Copies given contact's data to this controller
53 * @param contact Contact instance
55 void copyContactToController (final Contact contact);
58 * Edits currently loaded contact's data in database.
60 * @return Redirect outcome
62 String editContactData ();
65 * Getter for cellphone id
72 * Setter for cellphone id
74 * @param cellphoneId Mobile id
76 void setMobileId (final Long cellphoneId);
90 void setFaxId (final Long faxId);
93 * Getter for land-line id
95 * @return Land-line id
97 Long getLandLineId ();
100 * Setter for land-line id
102 * @param landLineId Land-line id
104 void setLandLineId (final Long landLineId);
107 * Getter for birth day
114 * Setter for birth day
116 * @param birthday Birth day
118 void setBirthday (final Date birthday);
121 * Getter for ellphone number's carrier
123 * @return Mobile number's carrier
125 MobileProvider getMobileProvider ();
128 * Setter for cellphone number's carrier prefix
130 * @param cellphoneCarrier Mobile number's carrier prefix
132 void setMobileProvider (final MobileProvider cellphoneCarrier);
135 * Getter for ellphone number
137 * @return Mobile number
139 Long getMobileNumber ();
142 * Setter for ellphone number
144 * @param mobileNumber Mobile number
146 void setMobileNumber (final Long mobileNumber);
158 * @param city the city to set
160 void setCity (final String city);
163 * Getter for comments
167 String getComment ();
172 * @param comment Comments
174 void setComment (final String comment);
177 * Getter for contact id
181 Long getContactId ();
184 * Setter for contact id
186 * @param contactId Contact id
188 void setContactId (final Long contactId);
191 * Getter for country instance
193 * @return Country instance
195 Country getCountry ();
198 * Setter for country instance
200 * @param country Country instance
202 void setCountry (final Country country);
205 * Getter for email address
207 * @return Email address
209 String getEmailAddress ();
212 * Setter for email address
214 * @param emailAddress Email address
216 void setEmailAddress (final String emailAddress);
221 * @return the familyName
223 String getFamilyName ();
228 * @param familyName the familyName to set
230 void setFamilyName (final String familyName);
233 * Getter for fax number's area code
235 * @return Fax number's area code
237 Integer getFaxAreaCode ();
240 * Setter for fax number's area code
242 * @param faxAreaCode Fax number's area code
244 void setFaxAreaCode (final Integer faxAreaCode);
247 * Getter for fax's country instance
249 * @return Fax' country instance
251 Country getFaxCountry ();
254 * Setter for fax's country instance
256 * @param faxCountry Fax' country instance
258 void setFaxCountry (final Country faxCountry);
261 * Getter for fax number
265 Long getFaxNumber ();
268 * Setter for fax number
270 * @param faxNumber Fax number
272 void setFaxNumber (final Long faxNumber);
277 * @return the first name
279 String getFirstName ();
284 * @param firstName the first name to set
286 void setFirstName (final String firstName);
289 * Gender of the contact
296 * Gender of the contact
298 * @param gender the gender to set
300 void setGender (final Gender gender);
305 * @return the houseNumber
307 Short getHouseNumber ();
312 * @param houseNumber the houseNumber to set
314 void setHouseNumber (final Short houseNumber);
317 * Getter for house number extension, example: 123a 'a' is then the
318 * extension and 123 is the house number.
320 * @return House number extension
322 String getHouseNumberExtension ();
325 * Setter for house number extension
327 * @param houseNumberExtension House number extension
329 void setHouseNumberExtension (final String houseNumberExtension);
332 * Getter for phone number's area code
334 * @return Phone number's area code
336 Integer getLandLineAreaCode ();
339 * Setter for phone number's area code
341 * @param phoneAreaCode Phone number's area code
343 void setLandLineAreaCode (final Integer phoneAreaCode);
346 * Getter for phone number's country instance
348 * @return Phone number's country instance
350 Country getLandLineCountry ();
353 * Setter for phone number's country instance
355 * @param phoneCountry Phone number's country instance
357 void setLandLineCountry (final Country phoneCountry);
360 * Getter for phone number
362 * @return Phone number
364 Long getLandLineNumber ();
367 * Setter for phone number
369 * @param phoneNumber Phone number
371 void setLandLineNumber (final Long phoneNumber);
383 * @param street the street to set
385 void setStreet (final String street);
399 void setTitle (final String title);
404 * @return the zipCode
406 Integer getZipCode ();
411 * @param zipCode the zipCode to set
413 void setZipCode (final Integer zipCode);
416 * Getter for controller type
418 * @return controller type
420 String getControllerType ();
423 * Setter for controller type
425 * @param controllerType Controller type
427 * @deprecated Don't use this method
430 void setControllerType (final String controllerType);
433 * Returns a text respresentation of given phone number or null if not set.
435 * @param phoneNumber Phone number
437 * @return Text respresentation or null
439 String generatePhoneNumber (final DialableNumber phoneNumber);
442 * Returns a text representation of given cellphone number or null if not
445 * @param mobileNumber Mobile number
447 * @return Text respresentation or null
449 String generateMobileNumber (final DialableMobileNumber mobileNumber);
452 * Checks/returns whether the gender/salutation is required for this
455 * @return Whether gender is required
457 boolean isGenderRequired ();