aboutsummaryrefslogtreecommitdiff
path: root/ufund-api
diff options
context:
space:
mode:
authorbeanplebs <benalmstead@gmail.com>2025-02-15 15:43:47 -0500
committerbeanplebs <benalmstead@gmail.com>2025-02-15 15:43:47 -0500
commit5890a4835bd09c6fb794828129006c64971e4489 (patch)
treeacf767b72d76b4f6d5ec6d13e1bf764c890d6570 /ufund-api
parent8268f5ee92372afb2f23045b25ec9bd45213f869 (diff)
parente4093fedb6ddf04f45caef8b592ec2201143ab89 (diff)
downloadJellySolutions-5890a4835bd09c6fb794828129006c64971e4489.tar.gz
JellySolutions-5890a4835bd09c6fb794828129006c64971e4489.tar.bz2
JellySolutions-5890a4835bd09c6fb794828129006c64971e4489.zip
Merge branch 'main' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b-jellysolutions
Diffstat (limited to 'ufund-api')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java4
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java27
2 files changed, 29 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
index 65a6656..4e67cf7 100644
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
@@ -18,7 +18,7 @@ public interface CupboardDAO {
Need[] getNeeds() throws IOException;
/**
- * Finds all {@linkplain Hero heroes} whose name contains the given text
+ * Finds all {@linkplain Need needs} whose name contains the given text
*
* @param containsText The text to match against
*
@@ -44,7 +44,7 @@ public interface CupboardDAO {
/**
* Creates and saves a {@linkplain Need need}
*
- * @param hero {@linkplain Need need} object to be created and saved
+ * @param need {@linkplain Need need} object to be created and saved
* <br>
* The id of the need object is automatically incremented.
*
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java
new file mode 100644
index 0000000..dda20b8
--- /dev/null
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java
@@ -0,0 +1,27 @@
+package com.ufund.api.ufundapi;
+
+import java.util.ArrayList;
+
+public class CupboardFileDao {
+
+ private ArrayList<Need> needs;
+ private final String filePath;
+
+ public CupboardFileDao(String filepath) {
+ this.filePath = filepath;
+ }
+
+ public ArrayList<Need> getNeeds() {
+ return needs;
+ }
+
+ public String getFilePath() {
+ return filePath;
+ }
+
+ public void addNeed(Need need) {
+ needs.add(need);
+ }
+
+
+} \ No newline at end of file