package org.mxchange.jshopcore.model.product;
import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.util.Deque;
+import java.util.List;
import javax.ejb.Remote;
+import org.mxchange.jshopcore.exceptions.CannotAddProductException;
import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException;
/**
* Product interface for "ADMIN" role
*
- * @author Roland Haeder
+ * @author Roland Haeder<roland@mxchange.org>
*/
@Remote
public interface AdminProductSessionBeanRemote extends Serializable {
* Some "getter" for a linked list of all products
*
* @return All products
- * @throws java.rmi.RemoteException If anything went wrong
*/
- public Deque<Product> getAllProducts () throws RemoteException;
+ public List<Product> getAllProducts ();
/**
* Adds given product data from request to database
*
* @param product Product instance
- * @throws java.rmi.RemoteException If something unexpected happened
+ * @return Updated product instance
* @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used
+ * @throws org.mxchange.jshopcore.exceptions.CannotAddProductException If something unexpected happened
*/
- public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException;
+ public Product doAdminAddProduct (final Product product) throws ProductTitleAlreadyUsedException, CannotAddProductException;
}