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.io.Serializable;
20 import java.rmi.RemoteException;
21 import java.util.Deque;
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;
29 * A remote-call interface for the shop
31 * @author Roland Haeder
34 public interface ShopSessionBeanRemote extends Serializable {
37 * Some "getter" for a linked list of only available products
39 * @return Only available products
40 * @throws java.rmi.RemoteException If anything went wrong
42 public Deque<Product> getAvailableProducts () throws RemoteException;
45 * Some "getter" for a linked list of all products
47 * @return All products
48 * @throws java.rmi.RemoteException If anything went wrong
50 public Deque<Product> getAllProducts () throws RemoteException;
53 * Some "getter" for a linked list of all categories
55 * @return All categories
56 * @throws java.rmi.RemoteException If anything went wrong
58 public Deque<Category> getAllCategories () throws RemoteException;
61 * Adds given category data from request to database
63 * @param category Category instance
64 * @throws java.rmi.RemoteException If something unexpected happened
65 * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used
67 public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
70 * Adds given product data from request to database
72 * @param product Product instance
73 * @throws java.rmi.RemoteException If something unexpected happened
74 * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used
76 public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;