]> git.mxchange.org Git - jbonuscard-lib.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 17 Oct 2017 20:49:13 +0000 (22:49 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 17 Oct 2017 21:17:20 +0000 (23:17 +0200)
- added administrative/general remote interface for receipt items
- fixed imports

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jfinancials/model/receipt/FinancialAdminReceiptSessionBeanRemote.java
src/org/mxchange/jfinancials/model/receipt/FinancialReceiptSessionBeanRemote.java
src/org/mxchange/jfinancials/model/receipt_item/FinancialAdminReceiptItemSessionBeanRemote.java [new file with mode: 0644]
src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItemSessionBeanRemote.java [new file with mode: 0644]

index c4438dcfe3b2654f9f1c72226cb1944854c93b51..5f34cf983e46372b72be174b340b76de96a3d2c9 100644 (file)
@@ -18,7 +18,7 @@ package org.mxchange.jfinancials.model.receipt;
 
 import java.io.Serializable;
 import javax.ejb.Remote;
-import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptAlreadyAddedException;
 
 /**
  * A remote interface for administrative EJBs for receipts
index 658610ca6e1aafa7b8d574434a095f229b8a7ea4..cb62f08e46477d9caed1679dd74038dfe8b2d398 100644 (file)
@@ -19,11 +19,11 @@ package org.mxchange.jfinancials.model.receipt;
 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>
  */
@@ -33,7 +33,7 @@ public interface FinancialReceiptSessionBeanRemote extends Serializable {
        /**
         * Returns a list of all receipts
         * <p>
-        * @return A list of all user's receipts
+        * @return A list of all receipts
         */
        List<BillableReceipt> allReceipts ();
 
diff --git a/src/org/mxchange/jfinancials/model/receipt_item/FinancialAdminReceiptItemSessionBeanRemote.java b/src/org/mxchange/jfinancials/model/receipt_item/FinancialAdminReceiptItemSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..d43c491
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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;
+
+}
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;
+
+}