]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java
Please cherry-pick:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / contact / PizzaContactWebSessionController.java
index 381330ef2638770697f7dc67a1c77ecc6cb190ed..4a79b73e1ba104e704aa5895eb1c490396918bf7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Haeder
+ * 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 java.util.List;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.gender.Gender;
-import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcustomercore.events.AdminAddedCustomerEvent;
-import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.jusercore.events.login.UserLoggedInEvent;
-import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
-import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
 
 /**
  * An interface for user beans
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
  */
 public interface PizzaContactWebSessionController extends Serializable {
 
@@ -42,12 +33,24 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
 
+       /**
+        * Getter for email address
+        * <p>
+        * @return Email address
+        */
+       String getEmailAddress ();
+
+       /**
+        * Clears both email address field
+        */
+       void clearEmailAddresses ();
+
        /**
         * Returns a list of all found contacts
         * <p>
         * @return A list of all contacts.
         */
-       List<Contact> allContacts();
+       List<Contact> allContacts ();
 
        /**
         * Updates all data from bean in given contact instance
@@ -56,13 +59,6 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        void updateContactDataFromController (final Contact userContact);
 
-       /**
-        * Adds given email address to list
-        * <p>
-        * @param contactEmailAddress Email address to add
-        */
-       void addEmailAddress (final String contactEmailAddress);
-
        /**
         * Tries to lookup contact by given id number. If the user is not found a
         * proper exceptions are thrown.
@@ -75,47 +71,6 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        Contact lookupContactById (final Long contactId) throws ContactNotFoundException;
 
-       /**
-        * Clears this controller
-        */
-       void clear ();
-
-       /**
-        * Event observer for new user registrations
-        * <p>
-        * @param event User registration event
-        */
-       void afterRegistrationEvent (final UserRegisteredEvent event);
-
-       /**
-        * Observes events being fired when an administrator has added a new
-        * customer
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedCustomer (final AdminAddedCustomerEvent event);
-
-       /**
-        * Event observer for newly added users by an administrator
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
-
-       /**
-        * Event observer for updated contact data by admins
-        * <p>
-        * @param event Updated contact data event
-        */
-       void afterAdminUpdatedContactDataEvent (final AdminUpdatedContactEvent event);
-
-       /**
-        * Event observer for logged-in user
-        * <p>
-        * @param event Event instance
-        */
-       void afterUserLogin (final UserLoggedInEvent event);
-
        /**
         * Creates an instance from all properties
         * <p>
@@ -124,284 +79,21 @@ public interface PizzaContactWebSessionController extends Serializable {
        Contact createContactInstance ();
 
        /**
-        * 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 getCellphoneCarrier ();
-
-       /**
-        * Setter for cellphone number's carrier prefix
+        * Getter for controller type
         * <p>
-        * @param cellphoneCarrier Cellphone number's carrier prefix
+        * @return controller type
         */
-       void setCellphoneCarrier (final MobileProvider cellphoneCarrier);
+       String getControllerType ();
 
        /**
-        * Getter for ellphone number
+        * Setter for controller type
         * <p>
-        * @return Cellphone number
-        */
-       Long getCellphoneNumber ();
-
-       /**
-        * Setter for ellphone number
-        * <p>
-        * @param cellphoneNumber Cellphone number
-        */
-       void setCellphoneNumber (final Long cellphoneNumber);
-
-       /**
-        * City
+        * @param controllerType Controller type
         * <p>
-        * @return the city
+        * @deprecated Don't use this method.
         */
-       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 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);
-
-       /**
-        * Getter for email address, repeated
-        * <p>
-        * @return the emailAddress, repeated
-        */
-       String getEmailAddressRepeat ();
-
-       /**
-        * Setter for email address repeated
-        * <p>
-        * @param emailAddressRepeat the emailAddress to set
-        */
-       void setEmailAddressRepeat (final String emailAddressRepeat);
-
-       /**
-        * 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 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);
-
-       /**
-        * ZIP code
-        * <p>
-        * @return the zipCode
-        */
-       Integer getZipCode ();
-
-       /**
-        * ZIP code
-        * <p>
-        * @param zipCode the zipCode to set
-        */
-       void setZipCode (final Integer zipCode);
+       @Deprecated
+       void setControllerType (final String controllerType);
 
        /**
         * Checks whether contact instance's email address is used
@@ -441,4 +133,12 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        String doChangePersonalContactData ();
 
+       /**
+        * Returns a list of all selectable contacts for user creation. Contacts
+        * from already existing users are excluded in this list.
+        * <p>
+        * @return A list of all selectable contacts
+        */
+       List<Contact> selectableContacts ();
+
 }