]> git.mxchange.org Git - jfinancials-lib.git/blobdiff - src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItemSessionBeanRemote.java
Continued:
[jfinancials-lib.git] / src / org / mxchange / jfinancials / model / receipt_item / FinancialReceiptItemSessionBeanRemote.java
diff --git a/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItemSessionBeanRemote.java b/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItemSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..ae3a2e6
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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;
+
+}