]> git.mxchange.org Git - jshop-lib.git/blobdiff - src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java
Updated author (email address) + jars + implemented very basic basket
[jshop-lib.git] / src / org / mxchange / jshopcore / model / basket / BasketSessionBeanRemote.java
index de3f3a1ea19cc1ce4a927083f5dbaef4fae1b8c9..721790a934b635b03f08d870b8ec3601d61fd77a 100644 (file)
@@ -20,30 +20,23 @@ import java.io.Serializable;
 import java.rmi.RemoteException;
 import java.util.Map;
 import javax.ejb.Remote;
+import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException;
 
 /**
  * An interface for a basket bean
  *
- * @author Roland Haeder
+ * @author Roland Haeder<roland@mxchange.org>
  */
 @Remote
 public interface BasketSessionBeanRemote extends Serializable {
-       /**
-        * Adds given item instance to this basket
-        * @param item Item instance to add
-        * @throws java.rmi.RemoteException If something bad happens
-        */
-       public void addItem (final AddableBasketItem item) throws RemoteException;
 
        /**
-        * Adds given item instance to basket. Remember that the product instance
-        * itself is not added. Instead a AddableBasketItem is created which holds
-        * information about amoutn and item type.
+        * Adds given item instance to this basket
         *
-        * @param item Item instance
-        * @throws java.rmi.RemoteException If something bad happens
+        * @param item Item instance to add
+        * @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException If the item as already been added
         */
-       public void addToBasket (final AddableBasketItem item) throws RemoteException;
+       public void addItem (final AddableBasketItem item) throws BasketItemAlreadyAddedException;
 
        /**
         * Checks if the basket is empty
@@ -55,33 +48,31 @@ public interface BasketSessionBeanRemote extends Serializable {
 
        /**
         * Checks whether the given product as already been added. If the product's
-        * item id number was found in basket, the corresponding item instance will be set
+        * item id number was found in basket, the corresponding item instance will
+        * be set
         *
         * @param item Item instance to check
         * @return Whether the given item has been found
-        * @throws java.rmi.RemoteException If something bad happens
         */
-       public boolean isAdded (final AddableBasketItem item) throws RemoteException;
+       public boolean isAdded (final AddableBasketItem item);
 
        /**
         * Some "getter" for all entries in this basket
         *
         * @return Map on all basket items
-        * @throws java.rmi.RemoteException If something bad happens
         */
-       public Map<Long, AddableBasketItem> getAll () throws RemoteException;
+       public Map<Long, AddableBasketItem> getAll ();
 
        /**
         * Getter for last entry
         *
         * @return Last added item in basket
-        * @throws java.rmi.RemoteException If something bad happens
         */
-       public AddableBasketItem getLast () throws RemoteException;
+       public AddableBasketItem getLast ();
 
        /**
         * Getter for last num rows
-        * 
+        *
         * @return Last num rows
         */
        public int getLastNumRows ();