import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
-import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptAlreadyAddedException;
import org.mxchange.jusercore.model.user.User;
/**
- * A remote interface for financial receipt stuff
+ * A remote interface for financial receipts
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
/**
* Returns a list of all receipts
* <p>
- * @return A list of all user's receipts
+ * @return A list of all receipts
*/
List<BillableReceipt> allReceipts ();
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * 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.jfinancials.model.receipt_item;
+
+import java.io.Serializable;
+import javax.ejb.Remote;
+import org.mxchange.jfinancials.exceptions.receipt_item.ReceiptItemAlreadyAddedException;
+import org.mxchange.jfinancials.model.receipt.item.BillableReceiptItem;
+
+/**
+ * A remote interface for administrative EJBs for receipt items
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface FinancialAdminReceiptItemSessionBeanRemote extends Serializable {
+
+ /**
+ * Adds given receipt item and returns the updated version. If the receipt
+ * item has already been found, a proper exception is being thrown.
+ * <p>
+ * @param receiptItem Receipt item being added
+ * <p>
+ * @return Updated receipt item
+ * <p>
+ * @throws ReceiptItemAlreadyAddedException If the receipt item has already
+ * been added
+ */
+ BillableReceiptItem addReceiptItem (final BillableReceiptItem receiptItem) throws ReceiptItemAlreadyAddedException;
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * 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.jfinancials.model.receipt_item;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+import org.mxchange.jfinancials.exceptions.receipt_item.ReceiptItemAlreadyAddedException;
+import org.mxchange.jfinancials.model.receipt.BillableReceipt;
+import org.mxchange.jfinancials.model.receipt.item.BillableReceiptItem;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A remote interface for financial receipt items
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface FinancialReceiptItemSessionBeanRemote extends Serializable {
+
+ /**
+ * Returns a list of all receipt items
+ * <p>
+ * @return A list of all receipt items
+ */
+ List<BillableReceiptItem> allReceiptItems ();
+
+ /**
+ * Returns a list of all items by given receipt instance
+ * <p>
+ * @param receipt Receipt instance
+ * <p>
+ * @return A list of all assigned receipt items
+ */
+ List<BillableReceiptItem> allReceiptItems (final BillableReceipt receipt);
+
+ /**
+ * Returns a list of all user's receipt items
+ * <p>
+ * @param user User instance to get all receipts for
+ * <p>
+ * @return A list of all user's receipt items
+ */
+ List<BillableReceiptItem> allUsersReceiptItems (final User user);
+
+ /**
+ * Adds given receipt item and returns the updated version. If the receipt
+ * item has already been found, a proper exception is being thrown.
+ * <p>
+ * @param receiptItem Receipt item being added
+ * <p>
+ * @return Updated receipt
+ * <p>
+ * @throws ReceiptItemAlreadyAddedException If the receipt item has already
+ * been added
+ */
+ BillableReceiptItem addReceiptItem (final BillableReceiptItem receiptItem) throws ReceiptItemAlreadyAddedException;
+
+}