-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * 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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jshopeelib.beans.remote.basket;
-
-import java.io.Serializable;
-import java.rmi.RemoteException;
-import java.util.Map;
-import javax.ejb.Remote;
-import org.mxchange.jshopcore.model.item.AddableBasketItem;
-
-/**
- * An interface for a basket bean
- *
- * @author Roland Haeder
- */
-@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
- */
- public boolean isEmpty () throws RemoteException;
-
- /**
- * 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
- */
- public boolean isAdded (final AddableBasketItem item) throws RemoteException;
-
- /**
- * 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;
-
- /**
- * 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 ();
-}