/*
- * 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.customer;
import java.io.Serializable;
-import org.mxchange.jcontacts.contact.gender.Gender;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jshopcore.model.customer.Customer;
+import java.util.List;
+import javax.ejb.Local;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcustomercore.model.customer.Customer;
+import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
+import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
/**
* An interface for customer beans
* <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
*/
+@Local
public interface PizzaCustomerWebSessionController extends Serializable {
/**
- * Creates an instance from all properties
+ * Observes events being fired when an administrator has added a new
+ * contact.
* <p>
- * @return A Customer instance
+ * @param event Event being fired
*/
- Customer createCustomerInstance ();
+ void afterAdminAddedContact (final ObservableAdminAddedContactEvent event);
/**
- * Cellphone number
+ * Observes events being fired when an administrator has added a new
+ * customer
* <p>
- * @return the cellphoneNumber
+ * @param event Event being fired
*/
- DialableCellphoneNumber getCellphoneNumber ();
+ void afterAdminAddedCustomer (final ObservableAdminAddedCustomerEvent event);
/**
- * Cellphone number
+ * Returns a list of all selectable contacts for user creation. Contacts
+ * from already existing users are excluded in this list.
* <p>
- * @param cellphoneNumber the cellphoneNumber to set
+ * @return A list of all selectable contacts
*/
- void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
+ List<Contact> selectableContacts ();
/**
- * City
+ * Checks whether the given contact is a customer
* <p>
- * @return the city
+ * @param contact Contact to check
+ *
+ * @return Whether the contact is a customer
*/
- String getCity ();
+ boolean isContactFound (final Contact contact);
/**
- * City
+ * All customer
* <p>
- * @param city the city to set
+ * @return A list of all customer profiles
*/
- void setCity (final String city);
+ List<Customer> allCustomers ();
/**
- * Getter for country instance
+ * Checks whether customers are registered
* <p>
- * @return Country instance
+ * @return Whether customers are registered
*/
- Country getCountry ();
+ boolean hasCustomers ();
- /**
- * Setter for country instance
- * <p>
- * @param country Country instance
- */
- void setCountry (final Country country);
-
- /**
- * Email address
- * <p>
- * @return the emailAddress
- */
- String getEmailAddress ();
-
- /**
- * Email address
- * <p>
- * @param emailAddress the emailAddress to set
- */
- 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);
-
- /**
- * Fax number
- * <p>
- * @return the faxNumber
- */
- DialableFaxNumber getFaxNumber ();
-
- /**
- * Fax number
- * <p>
- * @param faxNumber the faxNumber to set
- */
- void setFaxNumber (final DialableFaxNumber 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);
-
- /**
- * Phone number
- * <p>
- * @return the phoneNumber
- */
- DialableLandLineNumber getPhoneNumber ();
-
- /**
- * Phone number
- * <p>
- * @param phoneNumber the phoneNumber to set
- */
- void setPhoneNumber (final DialableLandLineNumber 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);
-
- /**
- * Checks whether all required personal data is set
- * <p>
- * @return Whether the required personal data is set
- */
- boolean isRequiredPersonalDataSet ();
}