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