2 * Copyright (C) 2016 - 2020 Free Software Foundation
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.pizzaapplication.beans.customer;
19 import java.io.Serializable;
20 import java.util.List;
21 import javax.ejb.Local;
22 import org.mxchange.jcontacts.model.contact.Contact;
23 import org.mxchange.jcustomercore.model.customer.Customer;
24 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
25 import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
28 * An interface for customer beans
30 * @author Roland Häder<roland@mxchange.org>
33 public interface PizzaCustomerWebSessionController extends Serializable {
36 * Observes events being fired when an administrator has added a new
39 * @param event Event being fired
41 void afterAdminAddedContact (final ObservableAdminAddedContactEvent event);
44 * Observes events being fired when an administrator has added a new
47 * @param event Event being fired
49 void afterAdminAddedCustomer (final ObservableAdminAddedCustomerEvent event);
52 * Returns a list of all selectable contacts for user creation. Contacts
53 * from already existing users are excluded in this list.
55 * @return A list of all selectable contacts
57 List<Contact> selectableContacts ();
60 * Checks whether the given contact is a customer
62 * @param contact Contact to check
64 * @return Whether the contact is a customer
66 boolean isContactFound (final Contact contact);
71 * @return A list of all customer profiles
73 List<Customer> allCustomers ();
76 * Checks whether customers are registered
78 * @return Whether customers are registered
80 boolean hasCustomers ();