]> git.mxchange.org Git - jshop-lib.git/blobdiff - src/org/mxchange/jshopcore/model/basket/BasketSessionBeanRemote.java
Continued:
[jshop-lib.git] / src / org / mxchange / jshopcore / model / basket / BasketSessionBeanRemote.java
index de3f3a1ea19cc1ce4a927083f5dbaef4fae1b8c9..c93b9b68339d0d20f90f0ca513eff840cb5922c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 package org.mxchange.jshopcore.model.basket;
 
 import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.util.Map;
+import java.util.List;
 import javax.ejb.Remote;
+import org.mxchange.jcustomercore.model.customer.Customer;
 
 /**
  * An interface for a basket bean
- *
- * @author Roland Haeder
+ * <p>
+ * @author Roland Häder<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.
-        *
-        * @param item Item instance
-        * @throws java.rmi.RemoteException If something bad happens
-        */
-       public void addToBasket (final AddableBasketItem item) throws RemoteException;
 
        /**
-        * Checks if the basket is empty
-        *
-        * @return Whether the basket is empty
-        * @throws java.rmi.RemoteException If something bad happens
+        * Returns user's current basket, or creates an empty initial if none is
+        * found.
+        * <p>
+        * @return User's current basked
         */
-       public boolean isEmpty () throws RemoteException;
+       Basket<AddableBasketItem> getCurrentBasket ();
 
        /**
-        * 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
-        *
-        * @param item Item instance to check
-        * @return Whether the given item has been found
-        * @throws java.rmi.RemoteException If something bad happens
+        * Clears this bean from previous usage
         */
-       public boolean isAdded (final AddableBasketItem item) throws RemoteException;
+       void clear ();
 
        /**
-        * Some "getter" for all entries in this basket
-        *
-        * @return Map on all basket items
-        * @throws java.rmi.RemoteException If something bad happens
+        * Registers the order list of tems with the customer
+        * <p>
+        * @param customer     Customer instance
+        * @param orderedItems Ordered items list
+        * <p>
+        * @return Access key
         */
-       public Map<Long, AddableBasketItem> getAll () throws RemoteException;
+       String registerItems (final Customer customer, final List<AddableBasketItem> orderedItems);
 
-       /**
-        * Getter for last entry
-        *
-        * @return Last added item in basket
-        * @throws java.rmi.RemoteException If something bad happens
-        */
-       public AddableBasketItem getLast () throws RemoteException;
-
-       /**
-        * Getter for last num rows
-        * 
-        * @return Last num rows
-        */
-       public int getLastNumRows ();
 }