2 * Copyright (C) 2015 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.pizzaapplication.beans.controller;
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;
30 * @author Roland Haeder
32 public interface PizzaWebBean extends FrameworkBean {
35 * Some "getter" for an iterator of only available products
37 * @return Only available products
38 * @throws java.rmi.RemoteException If anything went wrong
40 public Iterator<Product> getAvailableProductsIterator () throws RemoteException;
43 * Some "getter" for an iterator of all products
45 * @return All products
46 * @throws java.rmi.RemoteException If anything went wrong
48 public Iterator<Product> getAllProductsIterator () throws RemoteException;
51 * Some "getter" for an iterator of all categories
53 * @return All categories
54 * @throws java.rmi.RemoteException If anything went wrong
56 public Iterator<Category> getAllCategoriesIterator () throws RemoteException;
59 * Some "getter" for a linked list of only available products
61 * @return Only available products
62 * @throws java.rmi.RemoteException If anything went wrong
64 public Deque<Product> getAvailableProducts () throws RemoteException;
67 * Some "getter" for a linked list of all products
69 * @return All products
70 * @throws java.rmi.RemoteException If anything went wrong
72 public Deque<Product> getAllProducts () throws RemoteException;
75 * Some "getter" for a linked list of all categories
77 * @return All categories
78 * @throws java.rmi.RemoteException If anything went wrong
80 public Deque<Category> getAllCategories () throws RemoteException;
83 * Adds given category data from request to database
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
89 public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
92 * Adds given product data from request to database
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
98 public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;