package org.mxchange.jfinancials.financial.receipt;
import java.io.Serializable;
+import java.util.Collection;
import javax.ejb.Remote;
+import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException;
+import org.mxchange.jfinancials.model.receipt.BillableReceipt;
+import org.mxchange.jusercore.model.user.User;
/**
* A remote interface for financial receipt stuff
@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;
+
}