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.addressbook.beans.contact;
19 import java.io.Serializable;
20 import java.util.Date;
21 import java.util.List;
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.mobileprovider.MobileProvider;
28 * An administrative interface for user beans
30 * @author Roland Haeder<roland@mxchange.org>
32 public interface AddressbookAdminContactWebRequestController extends Serializable {
35 * Adds contact data to database and redirects on success. If the contact is
36 * already found, a proper exception is thrown.
38 * @return Redirect outcome
43 * Returns a list of all found contacts
45 * @return A list of all contacts.
47 List<Contact> allContacts ();
50 * Checks whether there are contacts.
52 * @return Whether contacts are there
54 boolean hasContacts ();
57 * Creates an instance from contact data
59 * @return New contact instance
61 Contact createContactInstance ();
64 * Copies given contact's data to this controller
66 * @param contact Contact instance
68 void copyContactToController (final Contact contact);
71 * Edits cuirrently loaded contact's data in database.
73 * @return Redirect outcome
75 String editContactData ();
78 * Getter for cellphone id
80 * @return Cellphone id
82 Long getCellphoneId ();
85 * Setter for cellphone id
87 * @param cellphoneId Cellphone id
89 void setCellphoneId (final Long cellphoneId);
101 * @param faxId Fax id
103 void setFaxId (final Long faxId);
106 * Getter for land-line id
108 * @return Land-line id
110 Long getLandLineId ();
113 * Setter for land-line id
115 * @param landLineId Land-line id
117 void setLandLineId (final Long landLineId);
120 * Getter for birth day
127 * Setter for birth day
129 * @param birthday Birth day
131 void setBirthday (final Date birthday);
134 * Getter for ellphone number's carrier
136 * @return Cellphone number's carrier
138 MobileProvider getCellphoneCarrier ();
141 * Setter for cellphone number's carrier prefix
143 * @param cellphoneCarrier Cellphone number's carrier prefix
145 void setCellphoneCarrier (final MobileProvider cellphoneCarrier);
148 * Getter for ellphone number
150 * @return Cellphone number
152 Long getCellphoneNumber ();
155 * Setter for ellphone number
157 * @param cellphoneNumber Cellphone number
159 void setCellphoneNumber (final Long cellphoneNumber);
171 * @param city the city to set
173 void setCity (final String city);
176 * Getter for comments
180 String getComment ();
185 * @param comment Comments
187 void setComment (final String comment);
190 * Getter for contact id
194 Long getContactId ();
197 * Setter for contact id
199 * @param contactId Contact id
201 void setContactId (final Long contactId);
204 * Getter for country instance
206 * @return Country instance
208 Country getCountry ();
211 * Setter for country instance
213 * @param country Country instance
215 void setCountry (final Country country);
218 * Getter for email address
220 * @return Email address
222 String getEmailAddress ();
225 * Setter for email address
227 * @param emailAddress Email address
229 void setEmailAddress (final String emailAddress);
234 * @return the familyName
236 String getFamilyName ();
241 * @param familyName the familyName to set
243 void setFamilyName (final String familyName);
246 * Getter for fax number's area code
248 * @return Fax number's area code
250 Integer getFaxAreaCode ();
253 * Setter for fax number's area code
255 * @param faxAreaCode Fax number's area code
257 void setFaxAreaCode (final Integer faxAreaCode);
260 * Getter for fax's country instance
262 * @return Fax' country instance
264 Country getFaxCountry ();
267 * Setter for fax's country instance
269 * @param faxCountry Fax' country instance
271 void setFaxCountry (final Country faxCountry);
274 * Getter for fax number
278 Long getFaxNumber ();
281 * Setter for fax number
283 * @param faxNumber Fax number
285 void setFaxNumber (final Long faxNumber);
290 * @return the first name
292 String getFirstName ();
297 * @param firstName the first name to set
299 void setFirstName (final String firstName);
302 * Gender of the contact
309 * Gender of the contact
311 * @param gender the gender to set
313 void setGender (final Gender gender);
318 * @return the houseNumber
320 Short getHouseNumber ();
325 * @param houseNumber the houseNumber to set
327 void setHouseNumber (final Short houseNumber);
330 * Getter for phone number's area code
332 * @return Phone number's area code
334 Integer getPhoneAreaCode ();
337 * Setter for phone number's area code
339 * @param phoneAreaCode Phone number's area code
341 void setPhoneAreaCode (final Integer phoneAreaCode);
344 * Getter for phone number's country instance
346 * @return Phone number's country instance
348 Country getPhoneCountry ();
351 * Setter for phone number's country instance
353 * @param phoneCountry Phone number's country instance
355 void setPhoneCountry (final Country phoneCountry);
358 * Getter for phone number
360 * @return Phone number
362 Long getPhoneNumber ();
365 * Setter for phone number
367 * @param phoneNumber Phone number
369 void setPhoneNumber (final Long phoneNumber);
381 * @param street the street to set
383 void setStreet (final String street);
388 * @return the zipCode
390 Integer getZipCode ();
395 * @param zipCode the zipCode to set
397 void setZipCode (final Integer zipCode);