/*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
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.gender.Gender;
-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 Cellphone id
- */
- Long getMobileId ();
-
- /**
- * Setter for cellphone id
- * <p>
- * @param cellphoneId Cellphone 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 Cellphone number's carrier
- */
- MobileProvider getMobileCarrier ();
-
- /**
- * Setter for cellphone number's carrier prefix
- * <p>
- * @param cellphoneCarrier Cellphone number's carrier prefix
- */
- void setMobileCarrier (final MobileProvider cellphoneCarrier);
-
- /**
- * Getter for ellphone number
- * <p>
- * @return Cellphone number
- */
- Long getMobileNumber ();
-
- /**
- * Setter for ellphone number
- * <p>
- * @param cellphoneNumber Cellphone number
- */
- void setMobileNumber (final Long cellphoneNumber);
-
- /**
- * 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);
-
- /**
- * Gender of the contact
- * <p>
- * @return the gender
- */
- Gender getGender ();
-
- /**
- * Gender of the contact
- * <p>
- * @param gender the gender to set
- */
- void setGender (final Gender gender);
-
- /**
- * 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 getPhoneAreaCode ();
-
- /**
- * Setter for phone number's area code
- * <p>
- * @param phoneAreaCode Phone number's area code
- */
- void setPhoneAreaCode (final Integer phoneAreaCode);
-
- /**
- * Getter for phone number's country instance
- * <p>
- * @return Phone number's country instance
- */
- Country getPhoneCountry ();
-
- /**
- * Setter for phone number's country instance
- * <p>
- * @param phoneCountry Phone number's country instance
- */
- void setPhoneCountry (final Country phoneCountry);
-
- /**
- * Getter for phone number
- * <p>
- * @return Phone number
- */
- Long getPhoneNumber ();
-
- /**
- * Setter for phone number
- * <p>
- * @param phoneNumber Phone number
- */
- void setPhoneNumber (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 title
- * <p>
- * @return title
- */
- String getTitle ();
-
- /**
- * Setter for title
- * <p>
- * @param title Title
- */
- void setTitle (final String title);
-
- /**
- * 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>
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 cellphoneNumber Cellphone number
- * <p>
- * @return Text respresentation or null
- */
- String generateCellphoneNumber (final DialableMobileNumber cellphoneNumber);
-
- /**
- * Checks/returns whether the gender/salutation is required for this
+ * Checks/returns whether the personal title (Mr./Mrs.) is required for this
* controller.
* <p>
- * @return Whether gender is required
+ * @return Whether personal title is required
+ * <p>
+ * @Deprecated Don't use this method
*/
- boolean isGenderRequired ();
+ @Deprecated
+ boolean isPersonalTitleRequired ();
}