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.pizzaapplication.beans.contact;
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;
30 * Administrative interface for user beans
32 * @author Roland Häder<roland@mxchange.org>
35 public interface PizzaAdminContactWebRequestController extends Serializable {
38 * Adds contact data to database and redirects on success. If the contact is
39 * already found, a proper exception is thrown.
41 * @return Redirect outcome
46 * Creates an instance from contact data
48 * @return New contact instance
50 Contact createContactInstance ();
53 * Copies given contact's data to this controller
55 * @param contact Contact instance
57 void copyContactToController (final Contact contact);
60 * Edits currently loaded contact's data in database.
62 * @return Redirect outcome
64 String editContactData ();
67 * Getter for cellphone id
69 * @return Cellphone id
71 Long getCellphoneId ();
74 * Setter for cellphone id
76 * @param cellphoneId Cellphone id
78 void setCellphoneId (final Long cellphoneId);
92 void setFaxId (final Long faxId);
95 * Getter for land-line id
97 * @return Land-line id
99 Long getLandLineId ();
102 * Setter for land-line id
104 * @param landLineId Land-line id
106 void setLandLineId (final Long landLineId);
109 * Getter for birth day
116 * Setter for birth day
118 * @param birthday Birth day
120 void setBirthday (final Date birthday);
123 * Getter for ellphone number's carrier
125 * @return Cellphone number's carrier
127 MobileProvider getCellphoneCarrier ();
130 * Setter for cellphone number's carrier prefix
132 * @param cellphoneCarrier Cellphone number's carrier prefix
134 void setCellphoneCarrier (final MobileProvider cellphoneCarrier);
137 * Getter for ellphone number
139 * @return Cellphone number
141 Long getCellphoneNumber ();
144 * Setter for ellphone number
146 * @param cellphoneNumber Cellphone number
148 void setCellphoneNumber (final Long cellphoneNumber);
160 * @param city the city to set
162 void setCity (final String city);
165 * Getter for comments
169 String getComment ();
174 * @param comment Comments
176 void setComment (final String comment);
179 * Getter for contact id
183 Long getContactId ();
186 * Setter for contact id
188 * @param contactId Contact id
190 void setContactId (final Long contactId);
193 * Getter for country instance
195 * @return Country instance
197 Country getCountry ();
200 * Setter for country instance
202 * @param country Country instance
204 void setCountry (final Country country);
207 * Getter for email address
209 * @return Email address
211 String getEmailAddress ();
214 * Setter for email address
216 * @param emailAddress Email address
218 void setEmailAddress (final String emailAddress);
223 * @return the familyName
225 String getFamilyName ();
230 * @param familyName the familyName to set
232 void setFamilyName (final String familyName);
235 * Getter for fax number's area code
237 * @return Fax number's area code
239 Integer getFaxAreaCode ();
242 * Setter for fax number's area code
244 * @param faxAreaCode Fax number's area code
246 void setFaxAreaCode (final Integer faxAreaCode);
249 * Getter for fax's country instance
251 * @return Fax' country instance
253 Country getFaxCountry ();
256 * Setter for fax's country instance
258 * @param faxCountry Fax' country instance
260 void setFaxCountry (final Country faxCountry);
263 * Getter for fax number
267 Long getFaxNumber ();
270 * Setter for fax number
272 * @param faxNumber Fax number
274 void setFaxNumber (final Long faxNumber);
279 * @return the first name
281 String getFirstName ();
286 * @param firstName the first name to set
288 void setFirstName (final String firstName);
291 * Gender of the contact
298 * Gender of the contact
300 * @param gender the gender to set
302 void setGender (final Gender gender);
307 * @return the houseNumber
309 Short getHouseNumber ();
314 * @param houseNumber the houseNumber to set
316 void setHouseNumber (final Short houseNumber);
319 * Getter for house number extension, example: 123a 'a' is then the
320 * extension and 123 is the house number.
322 * @return House number extension
324 String getHouseNumberExtension ();
327 * Setter for house number extension
329 * @param houseNumberExtension House number extension
331 void setHouseNumberExtension (final String houseNumberExtension);
334 * Getter for phone number's area code
336 * @return Phone number's area code
338 Integer getPhoneAreaCode ();
341 * Setter for phone number's area code
343 * @param phoneAreaCode Phone number's area code
345 void setPhoneAreaCode (final Integer phoneAreaCode);
348 * Getter for phone number's country instance
350 * @return Phone number's country instance
352 Country getPhoneCountry ();
355 * Setter for phone number's country instance
357 * @param phoneCountry Phone number's country instance
359 void setPhoneCountry (final Country phoneCountry);
362 * Getter for phone number
364 * @return Phone number
366 Long getPhoneNumber ();
369 * Setter for phone number
371 * @param phoneNumber Phone number
373 void setPhoneNumber (final Long phoneNumber);
385 * @param street the street to set
387 void setStreet (final String street);
401 void setTitle (final String title);
406 * @return the zipCode
408 Integer getZipCode ();
413 * @param zipCode the zipCode to set
415 void setZipCode (final Integer zipCode);
418 * Getter for controller type
420 * @return controller type
422 String getControllerType ();
425 * Setter for controller type
427 * @param controllerType Controller type
429 * @deprecated Don't use this method
432 void setControllerType (final String controllerType);
435 * Returns a text respresentation of given phone number or null if not set.
437 * @param phoneNumber Phone number
439 * @return Text respresentation or null
441 String generatePhoneNumber (final DialableNumber phoneNumber);
444 * Returns a text representation of given cellphone number or null if not
447 * @param cellphoneNumber Cellphone number
449 * @return Text respresentation or null
451 String generateCellphoneNumber (final DialableMobileNumber cellphoneNumber);
454 * Checks/returns whether the gender/salutation is required for this
457 * @return Whether gender is required
459 boolean isGenderRequired ();