]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
Brought back the mini basket "tag" to live + added post-construct init() method.
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / controller / PizzaWebBean.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (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 General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.pizzaapplication.beans.controller;
18
19 import java.util.Deque;
20 import java.util.Iterator;
21 import javax.faces.view.facelets.FaceletException;
22 import org.mxchange.jcoreee.beans.FrameworkBean;
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  *
29  * @author Roland Haeder
30  */
31 public interface PizzaWebBean extends FrameworkBean {
32
33         /**
34          * Some "getter" for an iterator of only available products
35          * 
36          * @return Only available products
37          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
38          */
39         public Iterator<Product> getAvailableProductsIterator () throws FaceletException;
40
41         /**
42          * Some "getter" for an iterator of all products
43          *
44          * @return All products
45          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
46          */
47         public Iterator<Product> getAllProductsIterator () throws FaceletException;
48
49         /**
50          * Some "getter" for an iterator of all categories
51          *
52          * @return All categories
53          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
54          */
55         public Iterator<Category> getAllCategoriesIterator () throws FaceletException;
56
57         /**
58          * Some "getter" for a linked list of only available products
59          * 
60          * @return Only available products
61          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
62          */
63         public Deque<Product> getAvailableProducts () throws FaceletException;
64
65         /**
66          * Some "getter" for a linked list of all products
67          *
68          * @return All products
69          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
70          */
71         public Deque<Product> getAllProducts () throws FaceletException;
72
73         /**
74          * Some "getter" for a linked list of all categories
75          *
76          * @return All categories
77          * @throws javax.faces.view.facelets.FaceletException If anything went wrong
78          */
79         public Deque<Category> getAllCategories () throws FaceletException;
80
81         /**
82          * Adds given category data from request to database
83          *
84          * @param category Category instance
85          * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
86          */
87         public void doAdminAddCategory (final Category category) throws FaceletException;
88
89         /**
90          * Adds given product data from request to database
91          *
92          * @param product Product instance
93          * @throws javax.faces.view.facelets.FaceletException If something unexpected happened
94          */
95         public void doAdminAddProduct (final Product product) throws FaceletException;
96 }