]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationController.java
Continued a bit:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / shop / PizzaShopWebApplicationController.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.shop;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import javax.faces.view.facelets.FaceletException;
22 import org.mxchange.jshopcore.events.category.AddedCategoryEvent;
23 import org.mxchange.jshopcore.model.category.Category;
24 import org.mxchange.jshopcore.model.product.Product;
25
26 /**
27  * An interface for the shop
28  * <p>
29  * @author Roland Haeder<roland@mxchange.org>
30  */
31 public interface PizzaShopWebApplicationController extends Serializable {
32
33         /**
34          * Adds given category to the "cached" instance
35          * <p>
36          * @param category Category instance
37          * @todo Move this to own controller
38          */
39         void addCategory (final Category category);
40
41         /**
42          * Adds given product to the "cached" instance
43          * <p>
44          * @param product Product instance
45          */
46         void addProduct (final Product product);
47
48         /**
49          * Some "getter" for a linked list of all categories
50          * <p>
51          * @return All categories
52          * <p>
53          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
54          * @todo Move this to own controller
55          */
56         List<Category> getAllCategories () throws FaceletException;
57
58         /**
59          * Some "getter" for a linked list of all categories including "Has no
60          * parent" fake category.
61          * <p>
62          * @return All categories
63          * <p>
64          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
65          * @todo Move this to own controller
66          */
67         List<Category> getAllCategoriesParent () throws FaceletException;
68
69         /**
70          * Some "getter" for a linked list of only available products
71          * <p>
72          * @return Only available products
73          * <p>
74          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
75          */
76         List<Product> getAvailableProducts () throws FaceletException;
77
78         /**
79          * Observes events fired after a new product category has been added
80          * <p>
81          * @param event Event to be observed
82          * @todo Move this to own controller
83          */
84         void afterShopCategoryAdded (final AddedCategoryEvent event);
85 }