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.pizzaapplication.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.cellphone.DialableCellphoneNumber;
26 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
29 * Administrative interface for user beans
31 * @author Roland Haeder<roland@mxchange.org>
33 public interface PizzaAdminContactWebRequestController 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 cuirrently loaded contact's data in database.
60 * @return Redirect outcome
62 String editContactData ();
65 * Getter for cellphone id
67 * @return Cellphone id
69 Long getCellphoneId ();
72 * Setter for cellphone id
74 * @param cellphoneId Cellphone id
76 void setCellphoneId (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 Cellphone number's carrier
125 MobileProvider getCellphoneCarrier ();
128 * Setter for cellphone number's carrier prefix
130 * @param cellphoneCarrier Cellphone number's carrier prefix
132 void setCellphoneCarrier (final MobileProvider cellphoneCarrier);
135 * Getter for ellphone number
137 * @return Cellphone number
139 Long getCellphoneNumber ();
142 * Setter for ellphone number
144 * @param cellphoneNumber Cellphone number
146 void setCellphoneNumber (final Long cellphoneNumber);
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 phone number's area code
319 * @return Phone number's area code
321 Integer getPhoneAreaCode ();
324 * Setter for phone number's area code
326 * @param phoneAreaCode Phone number's area code
328 void setPhoneAreaCode (final Integer phoneAreaCode);
331 * Getter for phone number's country instance
333 * @return Phone number's country instance
335 Country getPhoneCountry ();
338 * Setter for phone number's country instance
340 * @param phoneCountry Phone number's country instance
342 void setPhoneCountry (final Country phoneCountry);
345 * Getter for phone number
347 * @return Phone number
349 Long getPhoneNumber ();
352 * Setter for phone number
354 * @param phoneNumber Phone number
356 void setPhoneNumber (final Long phoneNumber);
368 * @param street the street to set
370 void setStreet (final String street);
384 void setTitle (final String title);
389 * @return the zipCode
391 Integer getZipCode ();
396 * @param zipCode the zipCode to set
398 void setZipCode (final Integer zipCode);
401 * Returns a text respresentation of given phone number or null if not set.
403 * @param phoneNumber Phone number
405 * @return Text respresentation or null
407 String generatePhoneNumber (final DialableNumber phoneNumber);
410 * Returns a text representation of given cellphone number or null if not
413 * @param cellphoneNumber Cellphone number
415 * @return Text respresentation or null
417 String generateCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);