]> git.mxchange.org Git - jfinancials-lib.git/blobdiff - src/org/mxchange/jfinancials/model/receipt/FinancialReceiptSessionBeanRemote.java
Renamed package to 'model' as these remote interfaces belong to a model (entity).
[jfinancials-lib.git] / src / org / mxchange / jfinancials / model / receipt / FinancialReceiptSessionBeanRemote.java
diff --git a/src/org/mxchange/jfinancials/model/receipt/FinancialReceiptSessionBeanRemote.java b/src/org/mxchange/jfinancials/model/receipt/FinancialReceiptSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..da03bca
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+import java.util.Collection;
+import javax.ejb.Remote;
+import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A remote interface for financial receipt stuff
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface FinancialReceiptSessionBeanRemote extends Serializable {
+
+       /**
+        * Returns a collection of all user's receipts
+        * <p>
+        * @param user User instance to get all receipts for
+        * <p>
+        * @return A collection of all user's receipts
+        */
+       Collection<? extends BillableReceipt> allUsersReceipts (final User user);
+
+       /**
+        * Adds given receipt and returns the updated version. If the receipt has
+        * already been found, a proper exception is being thrown.
+        * <p>
+        * @param receipt Receipt being added
+        * <p>
+        * @return Updated receipt
+        * <p>
+        * @throws ReceiptAlreadyAddedException If the receipt has already been
+        * added
+        */
+       BillableReceipt addReceipt (final BillableReceipt receipt) throws ReceiptAlreadyAddedException;
+
+}