X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fpizzaapplication%2Fbeans%2Fcustomer%2FPizzaCustomerWebSessionController.java;h=5cf99f7a2207891635317cbc51e7d5bf9dca260e;hb=38e9f47d0def5e04f95a0ae03721413de386ce61;hp=825192fdfb91c07a08823e8c5ed8becbc391d8ef;hpb=5d1a525c51f8b70e5aac9e23beb809e35d97cfaf;p=pizzaservice-war.git diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java index 825192fd..5cf99f7a 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java @@ -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 @@ -17,199 +17,66 @@ 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.model.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 *

- * @author Roland Haeder + * @author Roland Häder */ +@Local public interface PizzaCustomerWebSessionController extends Serializable { /** - * Creates an instance from all properties + * Observes events being fired when an administrator has added a new + * contact. *

- * @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 *

- * @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. *

- * @param cellphoneNumber the cellphoneNumber to set + * @return A list of all selectable contacts */ - void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); + List selectableContacts (); /** - * City + * Checks whether the given contact is a customer *

- * @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 *

- * @param city the city to set + * @return A list of all customer profiles */ - void setCity (final String city); + List allCustomers (); /** - * Getter for country instance + * Checks whether customers are registered *

- * @return Country instance + * @return Whether customers are registered */ - Country getCountry (); + boolean hasCustomers (); - /** - * Setter for country instance - *

- * @param country Country instance - */ - void setCountry (final Country country); - - /** - * Email address - *

- * @return the emailAddress - */ - String getEmailAddress (); - - /** - * Email address - *

- * @param emailAddress the emailAddress to set - */ - void setEmailAddress (final String emailAddress); - - /** - * Family name - *

- * @return the familyName - */ - String getFamilyName (); - - /** - * Family name - *

- * @param familyName the familyName to set - */ - void setFamilyName (final String familyName); - - /** - * Fax number - *

- * @return the faxNumber - */ - DialableFaxNumber getFaxNumber (); - - /** - * Fax number - *

- * @param faxNumber the faxNumber to set - */ - void setFaxNumber (final DialableFaxNumber faxNumber); - - /** - * First name - *

- * @return the first name - */ - String getFirstName (); - - /** - * First name - *

- * @param firstName the first name to set - */ - void setFirstName (final String firstName); - - /** - * Gender of the contact - *

- * @return the gender - */ - Gender getGender (); - - /** - * Gender of the contact - *

- * @param gender the gender to set - */ - void setGender (final Gender gender); - - /** - * House number - *

- * @return the houseNumber - */ - Short getHouseNumber (); - - /** - * House number - *

- * @param houseNumber the houseNumber to set - */ - void setHouseNumber (final Short houseNumber); - - /** - * Phone number - *

- * @return the phoneNumber - */ - DialableLandLineNumber getPhoneNumber (); - - /** - * Phone number - *

- * @param phoneNumber the phoneNumber to set - */ - void setPhoneNumber (final DialableLandLineNumber phoneNumber); - - /** - * Street - *

- * @return the street - */ - String getStreet (); - - /** - * Street - *

- * @param street the street to set - */ - void setStreet (final String street); - - /** - * ZIP code - *

- * @return the zipCode - */ - Integer getZipCode (); - - /** - * ZIP code - *

- * @param zipCode the zipCode to set - */ - void setZipCode (final Integer zipCode); - - /** - * Checks whether all required personal data is set - *

- * @return Whether the required personal data is set - */ - boolean isRequiredPersonalDataSet (); }