]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java
Updated copyright year
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / customer / PizzaCustomerWebSessionController.java
1 /*
2  * Copyright (C) 2016 - 2024 Free Software Foundation
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.pizzaapplication.beans.customer;
18
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;
26
27 /**
28  * An interface for customer beans
29  * <p>
30  * @author Roland Häder<roland@mxchange.org>
31  */
32 @Local
33 public interface PizzaCustomerWebSessionController extends Serializable {
34
35         /**
36          * Observes events being fired when an administrator has added a new
37          * contact.
38          * <p>
39          * @param event Event being fired
40          */
41         void afterAdminAddedContact (final ObservableAdminAddedContactEvent event);
42
43         /**
44          * Observes events being fired when an administrator has added a new
45          * customer
46          * <p>
47          * @param event Event being fired
48          */
49         void afterAdminAddedCustomer (final ObservableAdminAddedCustomerEvent event);
50
51         /**
52          * Returns a list of all selectable contacts for user creation. Contacts
53          * from already existing users are excluded in this list.
54          * <p>
55          * @return A list of all selectable contacts
56          */
57         List<Contact> selectableContacts ();
58
59         /**
60          * Checks whether the given contact is a customer
61          * <p>
62          * @param contact Contact to check
63          *
64          * @return Whether the contact is a customer
65          */
66         boolean isContactFound (final Contact contact);
67
68         /**
69          * All customer
70          * <p>
71          * @return A list of all customer profiles
72          */
73         List<Customer> allCustomers ();
74
75         /**
76          * Checks whether customers are registered
77          * <p>
78          * @return Whether customers are registered
79          */
80         boolean hasCustomers ();
81
82 }