package org.mxchange.pizzaapplication.beans.contact;
import java.io.Serializable;
-import java.util.Date;
-import javax.ejb.Local;
import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.DialableNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
/**
* Administrative interface for user beans
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-@Local
public interface PizzaAdminContactWebRequestController extends Serializable {
/**
- * Adds contact data to database and redirects on success. If the contact is
- * already found, a proper exception is thrown.
- * <p>
- * @return Redirect outcome
+ * Validates contact data and throws proper exceptions if not valid
*/
- String addContact ();
+ void validateContactData ();
/**
* Creates an instance from contact data
*/
void copyContactToController (final Contact contact);
- /**
- * Edits currently loaded contact's data in database.
- * <p>
- * @return Redirect outcome
- */
- String editContactData ();
-
- /**
- * Getter for cellphone id
- * <p>
- * @return Mobile id
- */
- Long getMobileId ();
-
- /**
- * Setter for cellphone id
- * <p>
- * @param cellphoneId Mobile id
- */
- void setMobileId (final Long cellphoneId);
-
- /**
- * Getter for fax id
- * <p>
- * @return Fax id
- */
- Long getFaxId ();
-
- /**
- * Setter for fax id
- * <p>
- * @param faxId Fax id
- */
- void setFaxId (final Long faxId);
-
- /**
- * Getter for land-line id
- * <p>
- * @return Land-line id
- */
- Long getLandLineId ();
-
- /**
- * Setter for land-line id
- * <p>
- * @param landLineId Land-line id
- */
- void setLandLineId (final Long landLineId);
-
- /**
- * Getter for birth day
- * <p>
- * @return Birth day
- */
- Date getBirthday ();
-
- /**
- * Setter for birth day
- * <p>
- * @param birthday Birth day
- */
- void setBirthday (final Date birthday);
-
- /**
- * Getter for ellphone number's carrier
- * <p>
- * @return Mobile number's carrier
- */
- MobileProvider getMobileProvider ();
-
- /**
- * Setter for cellphone number's carrier prefix
- * <p>
- * @param cellphoneCarrier Mobile number's carrier prefix
- */
- void setMobileProvider (final MobileProvider cellphoneCarrier);
-
- /**
- * Getter for ellphone number
- * <p>
- * @return Mobile number
- */
- Long getMobileNumber ();
-
- /**
- * Setter for ellphone number
- * <p>
- * @param mobileNumber Mobile number
- */
- void setMobileNumber (final Long mobileNumber);
-
- /**
- * City
- * <p>
- * @return the city
- */
- String getCity ();
-
- /**
- * City
- * <p>
- * @param city the city to set
- */
- void setCity (final String city);
-
- /**
- * Getter for comments
- * <p>
- * @return Comments
- */
- String getComment ();
-
- /**
- * Setter for comment
- * <p>
- * @param comment Comments
- */
- void setComment (final String comment);
-
- /**
- * Getter for contact id
- * <p>
- * @return Contact id
- */
- Long getContactId ();
-
- /**
- * Setter for contact id
- * <p>
- * @param contactId Contact id
- */
- void setContactId (final Long contactId);
-
- /**
- * Getter for country instance
- * <p>
- * @return Country instance
- */
- Country getCountry ();
-
- /**
- * Setter for country instance
- * <p>
- * @param country Country instance
- */
- void setCountry (final Country country);
-
- /**
- * Getter for email address
- * <p>
- * @return Email address
- */
- String getEmailAddress ();
-
- /**
- * Setter for email address
- * <p>
- * @param emailAddress Email address
- */
- void setEmailAddress (final String emailAddress);
-
- /**
- * Family name
- * <p>
- * @return the familyName
- */
- String getFamilyName ();
-
- /**
- * Family name
- * <p>
- * @param familyName the familyName to set
- */
- void setFamilyName (final String familyName);
-
- /**
- * Getter for fax number's area code
- * <p>
- * @return Fax number's area code
- */
- Integer getFaxAreaCode ();
-
- /**
- * Setter for fax number's area code
- * <p>
- * @param faxAreaCode Fax number's area code
- */
- void setFaxAreaCode (final Integer faxAreaCode);
-
- /**
- * Getter for fax's country instance
- * <p>
- * @return Fax' country instance
- */
- Country getFaxCountry ();
-
- /**
- * Setter for fax's country instance
- * <p>
- * @param faxCountry Fax' country instance
- */
- void setFaxCountry (final Country faxCountry);
-
- /**
- * Getter for fax number
- * <p>
- * @return Fax number
- */
- Long getFaxNumber ();
-
- /**
- * Setter for fax number
- * <p>
- * @param faxNumber Fax number
- */
- void setFaxNumber (final Long faxNumber);
-
- /**
- * First name
- * <p>
- * @return the first name
- */
- String getFirstName ();
-
- /**
- * First name
- * <p>
- * @param firstName the first name to set
- */
- void setFirstName (final String firstName);
-
- /**
- * Getter for personal title
- * <p>
- * @return Personal title
- */
- PersonalTitle getPersonalTitle ();
-
- /**
- * Setter for personal title
- * <p>
- * @param personalTitle Personal title
- */
- void setPersonalTitle (final PersonalTitle personalTitle);
-
- /**
- * House number
- * <p>
- * @return the houseNumber
- */
- Short getHouseNumber ();
-
- /**
- * House number
- * <p>
- * @param houseNumber the houseNumber to set
- */
- void setHouseNumber (final Short houseNumber);
-
- /**
- * Getter for house number extension, example: 123a 'a' is then the
- * extension and 123 is the house number.
- * <p>
- * @return House number extension
- */
- String getHouseNumberExtension ();
-
- /**
- * Setter for house number extension
- * <p>
- * @param houseNumberExtension House number extension
- */
- void setHouseNumberExtension (final String houseNumberExtension);
-
- /**
- * Getter for phone number's area code
- * <p>
- * @return Phone number's area code
- */
- Integer getLandLineAreaCode ();
-
- /**
- * Setter for phone number's area code
- * <p>
- * @param phoneAreaCode Phone number's area code
- */
- void setLandLineAreaCode (final Integer phoneAreaCode);
-
- /**
- * Getter for phone number's country instance
- * <p>
- * @return Phone number's country instance
- */
- Country getLandLineCountry ();
-
- /**
- * Setter for phone number's country instance
- * <p>
- * @param phoneCountry Phone number's country instance
- */
- void setLandLineCountry (final Country phoneCountry);
-
- /**
- * Getter for phone number
- * <p>
- * @return Phone number
- */
- Long getLandLineNumber ();
-
- /**
- * Setter for phone number
- * <p>
- * @param phoneNumber Phone number
- */
- void setLandLineNumber (final Long phoneNumber);
-
- /**
- * Street
- * <p>
- * @return the street
- */
- String getStreet ();
-
- /**
- * Street
- * <p>
- * @param street the street to set
- */
- void setStreet (final String street);
-
- /**
- * Getter for academic title
- * <p>
- * @return Academic title
- */
- String getAcademicTitle ();
-
- /**
- * Setter for academic title
- * <p>
- * @param academicTitle Academic title
- */
- void setAcademicTitle (final String academicTitle);
-
- /**
- * ZIP code
- * <p>
- * @return the zipCode
- */
- Integer getZipCode ();
-
- /**
- * ZIP code
- * <p>
- * @param zipCode the zipCode to set
- */
- void setZipCode (final Integer zipCode);
-
/**
* Getter for controller type
* <p>
@Deprecated
void setControllerType (final String controllerType);
- /**
- * Returns a text respresentation of given phone number or null if not set.
- * <p>
- * @param phoneNumber Phone number
- * <p>
- * @return Text respresentation or null
- */
- String generatePhoneNumber (final DialableNumber phoneNumber);
-
- /**
- * Returns a text representation of given cellphone number or null if not
- * set.
- * <p>
- * @param mobileNumber Mobile number
- * <p>
- * @return Text respresentation or null
- */
- String generateMobileNumber (final DialableMobileNumber mobileNumber);
-
/**
* Checks/returns whether the personal title (Mr./Mrs.) is required for this
* controller.
* <p>
* @return Whether personal title is required
+ * <p>
+ * @Deprecated Don't use this method
*/
+ @Deprecated
boolean isPersonalTitleRequired ();
}