]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionController.java
The customer is now differently created, first you need to get the contact-relevant...
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / customer / PizzaCustomerWebSessionController.java
1 /*
2  * Copyright (C) 2016 Roland Haeder
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 org.mxchange.jcontacts.contact.Contact;
22 import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
23 import org.mxchange.jcustomercore.events.AdminAddedCustomerEvent;
24 import org.mxchange.jcustomercore.model.customer.Customer;
25
26 /**
27  * An interface for customer beans
28  * <p>
29  * @author Roland Haeder<roland@mxchange.org>
30  */
31 public interface PizzaCustomerWebSessionController extends Serializable {
32
33         /**
34          * Observes events being fired when an administrator has added a new
35          * contact.
36          * <p>
37          * @param event Event being fired
38          */
39         void afterAdminAddedContact (final AdminAddedContactEvent event);
40
41         /**
42          * Observes events being fired when an administrator has added a new
43          * customer
44          * <p>
45          * @param event Event being fired
46          */
47         void afterAdminAddedCustomer (final AdminAddedCustomerEvent event);
48
49         /**
50          * Returns a list of all selectable contacts for user creation. Contacts
51          * from already existing users are excluded in this list.
52          * <p>
53          * @return A list of all selectable contacts
54          */
55         List<Contact> selectableContacts ();
56
57         /**
58          * Checks whether the given contact is a customer
59          * <p>
60          * @param contact Contact to check
61          *
62          * @return Whether the contact is a customer
63          */
64         boolean isContactFound (final Contact contact);
65
66         /**
67          * All customer
68          * <p>
69          * @return A list of all customer profiles
70          */
71         List<Customer> allCustomers ();
72
73         /**
74          * Checks whether customers are registered
75          * <p>
76          * @return Whether customers are registered
77          */
78         boolean hasCustomers ();
79
80 }