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
32 * @author Roland Haeder
35 public interface ShopSessionBeanRemote extends ShopBean {
38 * Some "getter" for an iterator of only available products
40 * @return Only available products
41 * @throws java.rmi.RemoteException If anything went wrong
43 public Iterator<Product> getAvailableProductsIterator () throws RemoteException;
46 * Some "getter" for an iterator of all products
48 * @return All products
49 * @throws java.rmi.RemoteException If anything went wrong
51 public Iterator<Product> getAllProductsIterator () throws RemoteException;
54 * Some "getter" for an iterator of all categories
56 * @return All categories
57 * @throws java.rmi.RemoteException If anything went wrong
59 public Iterator<Category> getAllCategoriesIterator () throws RemoteException;
62 * Some "getter" for a linked list of only available products
64 * @return Only available products
65 * @throws java.rmi.RemoteException If anything went wrong
67 public Deque<Product> getAvailableProducts () throws RemoteException;
70 * Some "getter" for a linked list of all products
72 * @return All products
73 * @throws java.rmi.RemoteException If anything went wrong
75 public Deque<Product> getAllProducts () throws RemoteException;
78 * Some "getter" for a linked list of all categories
80 * @return All categories
81 * @throws java.rmi.RemoteException If anything went wrong
83 public Deque<Category> getAllCategories () throws RemoteException;
86 * Adds given category data from request to database
88 * @param category Category instance
89 * @throws java.rmi.RemoteException If something unexpected happened
90 * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used
92 public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
95 * Adds given product data from request to database
97 * @param product Product instance
98 * @throws java.rmi.RemoteException If something unexpected happened
99 * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used
101 public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;