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=098f529bdcef38d1f0b573083d15249962507649;hpb=9641a385a1ebefa3c8627dd61f6b2696adc9a97e;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 098f529b..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 @@ -18,23 +18,43 @@ package org.mxchange.pizzaapplication.beans.customer; import java.io.Serializable; import java.util.List; -import org.mxchange.jcontacts.contact.Contact; +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 { /** - * Adds customer instance to list. The customer should be an updated - * instance (with id number). + * Observes events being fired when an administrator has added a new + * contact. *

- * @param customer Customer instance + * @param event Event being fired */ - void addCustomer (final Customer customer); + void afterAdminAddedContact (final ObservableAdminAddedContactEvent event); + + /** + * Observes events being fired when an administrator has added a new + * customer + *

+ * @param event Event being fired + */ + void afterAdminAddedCustomer (final ObservableAdminAddedCustomerEvent event); + + /** + * Returns a list of all selectable contacts for user creation. Contacts + * from already existing users are excluded in this list. + *

+ * @return A list of all selectable contacts + */ + List selectableContacts (); /** * Checks whether the given contact is a customer