]> git.mxchange.org Git - jcustomer-lib.git/blob - src/org/mxchange/jshopeelib/beans/remote/shop/ShopSessionBeanRemote.java
0187d686894f57bbcaaeef15a12f76a1738e8b90
[jcustomer-lib.git] / src / org / mxchange / jshopeelib / beans / remote / shop / ShopSessionBeanRemote.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.jshopeelib.beans.remote.shop;
18
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;
28
29 /**
30  * A remote-call interface for the shop
31  * @author Roland Haeder
32  */
33 @Remote
34 public interface ShopSessionBeanRemote extends ShopBean {
35         /**
36          * Some "getter" for an iterator of only available products
37          * 
38          * @return Only available products
39          * @throws java.rmi.RemoteException If anything went wrong
40          */
41         public Iterator<Product> getAvailableProductsIterator () throws RemoteException;
42
43         /**
44          * Some "getter" for an iterator of all products
45          *
46          * @return All products
47          * @throws java.rmi.RemoteException If anything went wrong
48          */
49         public Iterator<Product> getAllProductsIterator () throws RemoteException;
50
51         /**
52          * Some "getter" for an iterator of all categories
53          *
54          * @return All categories
55          * @throws java.rmi.RemoteException If anything went wrong
56          */
57         public Iterator<Category> getAllCategoriesIterator () throws RemoteException;
58
59         /**
60          * Some "getter" for a linked list of only available products
61          * 
62          * @return Only available products
63          * @throws java.rmi.RemoteException If anything went wrong
64          */
65         public Deque<Product> getAvailableProducts () throws RemoteException;
66
67         /**
68          * Some "getter" for a linked list of all products
69          *
70          * @return All products
71          * @throws java.rmi.RemoteException If anything went wrong
72          */
73         public Deque<Product> getAllProducts () throws RemoteException;
74
75         /**
76          * Some "getter" for a linked list of all categories
77          *
78          * @return All categories
79          * @throws java.rmi.RemoteException If anything went wrong
80          */
81         public Deque<Category> getAllCategories () throws RemoteException;
82
83         /**
84          * Adds given category data from request to database
85          *
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
89          */
90         public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException;
91
92         /**
93          * Adds given product data from request to database
94          *
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
98          */
99         public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;
100 }