]> 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 94661c460b1c43874dee76dc3f42f4ac5999eccb..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.util.Map;
+import java.util.List;
 import javax.ejb.Remote;
-import org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException;
+import org.mxchange.jcustomercore.model.customer.Customer;
 
 /**
  * An interface for a basket bean
- *
- * @author Roland Haeder<roland@mxchange.org>
+ * <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 org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException If the item as already been added
+        * Returns user's current basket, or creates an empty initial if none is
+        * found.
+        * <p>
+        * @return User's current basked
         */
-       public void addItem (final AddableBasketItem item) throws BasketItemAlreadyAddedException;
+       Basket<AddableBasketItem> getCurrentBasket ();
 
        /**
-        * Checks if the basket is empty
-        *
-        * @return Whether the basket is empty
+        * Clears this bean from previous usage
         */
-       public boolean isEmpty ();
+       void clear ();
 
        /**
-        * 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
+        * Registers the order list of tems with the customer
+        * <p>
+        * @param customer     Customer instance
+        * @param orderedItems Ordered items list
+        * <p>
+        * @return Access key
         */
-       public boolean isAdded (final AddableBasketItem item);
+       String registerItems (final Customer customer, final List<AddableBasketItem> orderedItems);
 
-       /**
-        * Some "getter" for all entries in this basket
-        *
-        * @return Map on all basket items
-        */
-       public Map<Long, AddableBasketItem> getAll ();
-
-       /**
-        * Getter for last entry
-        *
-        * @return Last added item in basket
-        */
-       public AddableBasketItem getLast ();
-
-       /**
-        * Getter for last num rows
-        *
-        * @return Last num rows
-        */
-       public int getLastNumRows ();
 }