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.jshopeelib.beans.remote.shop;
19 import java.rmi.RemoteException;
20 import java.util.Deque;
21 import java.util.Iterator;
22 import javax.ejb.Remote;
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 import org.mxchange.jshopeelib.beans.ShopBean;
30 * A remote-call interface for the shop
31 * @author Roland Haeder
34 public interface ShopSessionBeanRemote extends ShopBean {
36 * Some "getter" for an iterator of only available products
38 * @return Only available products
39 * @throws java.rmi.RemoteException If anything went wrong
41 public Iterator<Product> getAvailableProductsIterator () throws RemoteException;
44 * Some "getter" for an iterator of all products
46 * @return All products
47 * @throws java.rmi.RemoteException If anything went wrong
49 public Iterator<Product> getAllProductsIterator () throws RemoteException;
52 * Some "getter" for an iterator of all categories
54 * @return All categories
55 * @throws java.rmi.RemoteException If anything went wrong
57 public Iterator<Category> getAllCategoriesIterator () throws RemoteException;
60 * Some "getter" for a linked list of only available products
62 * @return Only available products
63 * @throws java.rmi.RemoteException If anything went wrong
65 public Deque<Product> getAvailableProducts () throws RemoteException;
68 * Some "getter" for a linked list of all products
70 * @return All products
71 * @throws java.rmi.RemoteException If anything went wrong
73 public Deque<Product> getAllProducts () throws RemoteException;
76 * Some "getter" for a linked list of all categories
78 * @return All categories
79 * @throws java.rmi.RemoteException If anything went wrong
81 public Deque<Category> getAllCategories () throws RemoteException;
84 * Adds given category data from request to database
86 * @param category Category instance
87 * @throws java.rmi.RemoteException If something unexpected happened
88 * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used
90 public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
93 * Adds given product data from request to database
95 * @param product Product instance
96 * @throws java.rmi.RemoteException If something unexpected happened
97 * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used
99 public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;