]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
Renaming season is not yet over ... ;-)
[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.rmi.RemoteException;
20 import java.util.Deque;
21 import java.util.Iterator;
22 import org.mxchange.jcoreee.beans.FrameworkBean;
23 import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException;
24 import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException;
25 import org.mxchange.jshopcore.model.category.Category;
26 import org.mxchange.jshopcore.model.product.Product;
27
28 /**
29  *
30  * @author Roland Haeder
31  */
32 public interface PizzaWebBean extends FrameworkBean {
33
34         /**
35          * Some "getter" for an iterator of only available products
36          * 
37          * @return Only available products
38          * @throws java.rmi.RemoteException If anything went wrong
39          */
40         public Iterator<Product> getAvailableProductsIterator () throws RemoteException;
41
42         /**
43          * Some "getter" for an iterator of all products
44          *
45          * @return All products
46          * @throws java.rmi.RemoteException If anything went wrong
47          */
48         public Iterator<Product> getAllProductsIterator () throws RemoteException;
49
50         /**
51          * Some "getter" for an iterator of all categories
52          *
53          * @return All categories
54          * @throws java.rmi.RemoteException If anything went wrong
55          */
56         public Iterator<Category> getAllCategoriesIterator () throws RemoteException;
57
58         /**
59          * Some "getter" for a linked list of only available products
60          * 
61          * @return Only available products
62          * @throws java.rmi.RemoteException If anything went wrong
63          */
64         public Deque<Product> getAvailableProducts () throws RemoteException;
65
66         /**
67          * Some "getter" for a linked list of all products
68          *
69          * @return All products
70          * @throws java.rmi.RemoteException If anything went wrong
71          */
72         public Deque<Product> getAllProducts () throws RemoteException;
73
74         /**
75          * Some "getter" for a linked list of all categories
76          *
77          * @return All categories
78          * @throws java.rmi.RemoteException If anything went wrong
79          */
80         public Deque<Category> getAllCategories () throws RemoteException;
81
82         /**
83          * Adds given category data from request to database
84          *
85          * @param category Category instance
86          * @throws java.rmi.RemoteException If something unexpected happened
87          * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used
88          */
89         public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
90
91         /**
92          * Adds given product data from request to database
93          *
94          * @param product Product instance
95          * @throws java.rmi.RemoteException If something unexpected happened
96          * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used
97          */
98         public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;
99 }