From 8a45611c901d192d19fe62e76e902c352c0146e0 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 10:45:15 +0100 Subject: [PATCH 1/6] Added git ignore to avoid pointless configs --- .gitignore | 2 + .../sytemutvikling/team6/models/Charity.java | 74 ++++++++++++++++++ .../sytemutvikling/team6/models/Charity.class | Bin 312 -> 1381 bytes 3 files changed, 76 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eafe2b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Adrian +/vscode diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index 92ebbf1..cf86734 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -1,4 +1,78 @@ +/** + * This class represents a charity organization. It contains information about the charity such as its name, description, total donations, verification status, and category. + * + * @author Adrian Balunan + */ package ntnu.sytemutvikling.team6.models; +import java.util.UUID; + abstract class Charity { + /* UUID for uniquely identifying each charity */ + private UUID id; + + /* Name of the charity */ + private String name; + + /* Description of the charity's mission and activities */ + private String description; + + /* Total Donations received */ + private int totalDonations; + + /* Is the charity verified? */ + private boolean isVerified; + + /* Category for the charity */ + private String category; + + /** + * Konstructor for creating a new charity. + * The ID is generated automatically using UUID. + * Total donations are initialized to 0. + * The charity is unverified by default. + * + * @param name + * @param description + * @param category + */ + public Charity(String name, String description, String category) { + this.id = UUID.randomUUID(); + this.name = name; + this.description = description; + this.totalDonations = 0; + this.isVerified = false; + this.category = category; + } + + /** + * Getters for the charity's attributes. + * + * @return + */ + public UUID getId() { + return id; + } + public String getCategory() { + return category; + } + public String getName() { + return name; + } + public String getDescription() { + return description; + } + public int getTotalDonations() { + return totalDonations; + } + public boolean isVerified() { + return isVerified; + } + + public void setVerified() { + this.isVerified = true; + } + public void setUnverified() { + this.isVerified = false; + } } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class index 42f6e49d3e7e7a6647f5bf83abc35ab08a6f11ea..63dc161740a3f9d7bdd47a1a0657e0018a23056c 100644 GIT binary patch literal 1381 zcma)4%Tg0T6g{1U1d`z?_yCc&B*SBTAQmO1RRUJUinsu>a5p3)G)`u$Nrx&v!GCd~ zRi?CD_yK;D<>^l3G0uWb-`ltQoWA#*{{83YF917unnOyU7^tA-G|!aRXsJ{A!I#02 zqdd2=Qo|LV>goOEQgH1(20BMI=;(0Zx2trni5FKI_nj4&{EQO4i3uO&jd1o z+wcTNIwuCQry{cRtWfuwwMc$cG7JO;RH$5kI}BXCZwiRAKwdVhUL@a3kM!c5KyS@e z-ccBx31l~AAk}k$jpG08*Qu1M>~D+X<&nk>3xgOHNEb`hJZ|E44!79U)qyPB!8p5$ z+@Kyd^oSg-Sc;F`2Z6g5dXUxGJqtPX>TKFVUniTjkViq+<}Fz0*V%mw1LzePtjNII zZ8Z+PXx}~bje23t^{X^M@4Ll}I+j$)u3XnTD&BMCsWO!;Fm9a-Ir?vctM=r0Y1gj`QF&P2*)B1L1=3Jzk3>o9kph|4f8*xxZ?|G-!q6ZTRYllF2OQ+B$I z8NJNeD{U-%H8hJ{XARXNp+!DYBAtyfEMXkWn8FI?vC0#$YRGxR=8n&pCWXm#n<?DGx;@}sF;0Jh^(Duyd*vu~z!4@7Rfal`iokZ|sjCR3mlvk^rwKKH(!sWd2r_2xb b`VvF-T=KO92K`y$3>7lGNo06p#$5jkSrOlA delta 132 zcmaFLwS$T4)W2Q(7#J8_83ZPBxyiBFWaed-*fBCNYiNcsGO#%3r=)T*Ff(xSFt9SP zO`gdZJGq8Q*^7aJ5vT_!0;Ji2EPWsi7SYBtg;)K;7Ixk_VyyNb>@D Mj0}80l8J#I06cUMEC2ui From 1204060f2c40696d657a872a50f8bba4c6e5c0a3 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 10:46:06 +0100 Subject: [PATCH 2/6] Added git ignore to avoid pointless configs clutter --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index eafe2b1..f28f5be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # Adrian -/vscode +.vscode/ +.idea/ From 516434139f5e42f73ffc2096abaa2866580d1b19 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 10:49:48 +0100 Subject: [PATCH 3/6] Charity class --- .../sytemutvikling/team6/models/Charity.java | 11 +++++++++-- .../sytemutvikling/team6/models/Charity.class | Bin 1381 -> 1381 bytes 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index cf86734..7390917 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -47,8 +47,6 @@ public Charity(String name, String description, String category) { /** * Getters for the charity's attributes. - * - * @return */ public UUID getId() { return id; @@ -69,9 +67,18 @@ public boolean isVerified() { return isVerified; } + /** + * Setter for verification status. + * This one sets the charity as verified. + */ public void setVerified() { this.isVerified = true; } + + /** + * Setter for verification status. + * This one sets the charity as unverified. + */ public void setUnverified() { this.isVerified = false; } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class index 63dc161740a3f9d7bdd47a1a0657e0018a23056c..506a404958517c440a6cb791fad051f725ed637b 100644 GIT binary patch delta 83 zcmaFL^^|MFWM)Q_$rqVLC$D5yXEX=0Y#6P;d}S7OMq4l|0myOyv*rR>&S2Ip77bQ! V237{2$?UAQtieE5$Yf7e8309S7b5@w delta 83 zcmaFL^^|MFWM)RQ$rqVLC$D5yXS4*eY#438d}S7OMtd+T0myO!v*rR>u3*+J77bQU V237{I$?UAQtUf@N?_^I_830E*7aafq From 95563c21c8cdf863343ab2bd843945cf8e8cf709 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 11:34:07 +0100 Subject: [PATCH 4/6] Donation class, deleted Abstract implemention as its unnecessary, anonymity can be done on the presentation layer --- .../team6/models/AnonymousDonation.java | 4 - .../sytemutvikling/team6/models/Donation.java | 75 ++++++++++++++++++ .../team6/models/PublicDonation.java | 5 -- .../team6/models/AnonymousDonation.class | Bin 539 -> 0 bytes .../team6/models/Donation.class | Bin 315 -> 1459 bytes .../team6/models/PublicDonation.class | Bin 530 -> 0 bytes 6 files changed, 75 insertions(+), 9 deletions(-) delete mode 100644 helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/AnonymousDonation.java delete mode 100644 helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/PublicDonation.java delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/AnonymousDonation.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/PublicDonation.class diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/AnonymousDonation.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/AnonymousDonation.java deleted file mode 100644 index 6f991e9..0000000 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/AnonymousDonation.java +++ /dev/null @@ -1,4 +0,0 @@ -package ntnu.sytemutvikling.team6.models; - -public class AnonymousDonation extends Donation { -} diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Donation.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Donation.java index 1f457bd..78569b2 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Donation.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Donation.java @@ -1,4 +1,79 @@ package ntnu.sytemutvikling.team6.models; +import java.time.LocalDateTime; +import java.util.UUID; + public class Donation { + /* UUID for uniquely identifying each donation */ + private UUID charityId; + + /* Ammount of money donated */ + private double amount; + + /* Date and time of the donation */ + private LocalDateTime date; + + /* The charity that received the donation */ + private Charity charity; + + /* The user/donor that made the donation */ + private User donor; + + /** + * Is the donation made anonymously? + * This can be null if the donation was made anonymously. + * + */ + private boolean isAnonymous; + + /** + * Constructor for creating a new donation. + * The charityId is generated automatically using UUID. + * If the donation is made anonymously, the isAnonymous parameter is set to true. + * @param amount + * @param date + * @param charity + * @param donor + */ + public Donation(double amount, LocalDateTime date, Charity charity, User donor) { + this.charityId = UUID.randomUUID(); + this.amount = amount; + this.date = date; + this.charity = charity; + this.donor = donor; + + + // ASSUMES that this is the way to get the anonymous setting from the user's settings. + if (donor.getSettings().getAnonymous() == false) { + this.isAnonymous = true; + } else { + this.isAnonymous = false; + + } + } + + /* Getters for the donation's attributes */ + public boolean isAnonymous() { + return isAnonymous; + } + + public UUID getCharityId() { + return charityId; + } + + public double getAmount() { + return amount; + } + + public LocalDateTime getDate() { + return date; + } + + public Charity getCharity() { + return charity; + } + + public User getDonor() { + return donor; + } } diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/PublicDonation.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/PublicDonation.java deleted file mode 100644 index 7da3000..0000000 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/PublicDonation.java +++ /dev/null @@ -1,5 +0,0 @@ -package ntnu.sytemutvikling.team6.models; - -public class PublicDonation extends Donation { - -} diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/AnonymousDonation.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/AnonymousDonation.class deleted file mode 100644 index b00998e2e3f97d647cc16a2f2a1135db892768a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmb7BO-lnY5Phj@w_U5P_4~Ho>cs^q9;^uB2MVhms)EOK8*J)sQj%<;zf4fjyFW^t zRjUV29`c5nyqUZ=d3%3)0dRs1A0>tzOOLUXS-3R`y#c`q0(xS z>D(S`#huj3hsV$u@-dH6PVB4RP$Z6_yf2k>2MjZ1~i28k08S1~>6JxZgV2ba%iy$S}J`SC^B+dCiE$5 uQ94L29Kz{QdUBpu;7618-%ql78cR`tSu3iu#6Roz&ag|7^@!?jgOZA diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class index 17aeae8da0e0328d150d31ab701f3434f89291ce..14086277da5617627b9c8b6c6cb76aa36f7a82c3 100644 GIT binary patch literal 1459 zcma)*TTj$L6vzLwu)Az20xPJ9m*R~rAoYTHK}`sY3CXGtuq5(UwgX#iXGl9G+3#ec z4<;s>=(``vc&2+Jo0|1y&P?b0&Tanv{pb5n0NZ$0M2^80N+eF)Qanu5ng22H#j&Hf z8?HN{^mq_ERViHMOHsrq!_sorBC_ixO^_}Vl zL%|JYBFK+b8Ad%1fz}rzI zqcL1&IH-$=$1*tMp4E`ysUM^-Vx30vFyP?}%P8$NxfOENl%93W)h<_x9x|@jmLFS* z@c5B02tJaLrN~pYPPwJC8wO@DXJQ&x8D=Z(uG8n;RS`wl(A7=W2!5A@hdkPIDIr5S zeYJghcYW@B992!9Cb>Mk@2;fi6-FxdK?w{CCMGe(U{dv+0ct^&EB2tIwD(;Tc@#){ zboF?v@D8XPb`nefa2>NgR=_n6PjKgFY(|Oxs zwErhYDgqtgiHQkZpfYx45;gc6Ur&0XJF8VK3@nh}2>reV7nRgqc> zmRg!C*&>nCDARh8PHPlJ)5Z_Xd?;V~hAY2P-+5XKgKyz>27Kqs0Q@QwzK6vgoa<$-d>()|GvOsH_uzinD}$N0 iGvQU5MSE)Jdwwto?_|P{@Hhir8-(9x!s}^sPyYh^S3T(f delta 141 zcmdnYy_-qk)W2Q(7#J8_83foFm>3x}Cq7i1Xs95^W|NthSz^b?z^tJe#>l|poS%}) z#lXzK$-}_Pz&6>CDQ@y2W)&|621XzRiU3J=pfUPjJ_7@*)^-MtjX(h=1}-28l4bzv X<_3~HU^Xj|<^}Q?8Tf!C69Yd07FH3C diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/PublicDonation.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/PublicDonation.class deleted file mode 100644 index 7ce578656650a575bfa647a33243c3ba7b00f1be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530 zcmb7BO-lnY5PhlDt?O!QwSL^zn_gT5@nFS^Rut9`uogUK*PyApNlCJW{xU&9@BS!p zR;|UOhrD4XZzk_e-anpS0d%nLp~4U;r;5mqoX86|l#iKI_mLAk--~j6Co&sd6-g%3 zW39N8T6w54H2QqVql^>vGU)IJ|(k`{sW2wYNktf1*IgMv%#yaI$j~iL$KgFthkd|R5{^v&84F0t)Oe#)fIeh8w z!nR9IB<@V5T3KnGQ0`O;!%g}y^03NK8(U=v&ZV`ayG!0IHbCp7zXC-@9%l$W%66&B sDEcp`-8TIv1aFj8P$w)op!)`4@Xf*^nqRdg!U~qrq6n Date: Thu, 19 Feb 2026 11:53:40 +0100 Subject: [PATCH 5/6] Feedback class, added an attribute to charity that contain a list of feedbacks --- .../sytemutvikling/team6/models/Charity.java | 6 ++ .../sytemutvikling/team6/models/Feedback.java | 61 ++++++++++++++++++ .../sytemutvikling/team6/models/Charity.class | Bin 1381 -> 1559 bytes .../team6/models/Feedback.class | Bin 315 -> 1251 bytes 4 files changed, 67 insertions(+) diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index 7390917..3106d09 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -5,7 +5,9 @@ */ package ntnu.sytemutvikling.team6.models; +import java.util.List; import java.util.UUID; +import java.util.ArrayList; abstract class Charity { /* UUID for uniquely identifying each charity */ @@ -26,6 +28,9 @@ abstract class Charity { /* Category for the charity */ private String category; + /* List that contains the charity's Feedbacks */ + private List feedbacks; + /** * Konstructor for creating a new charity. * The ID is generated automatically using UUID. @@ -42,6 +47,7 @@ public Charity(String name, String description, String category) { this.description = description; this.totalDonations = 0; this.isVerified = false; + this.feedbacks = new ArrayList<>(); this.category = category; } diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Feedback.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Feedback.java index 1cea4ca..891dce1 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Feedback.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Feedback.java @@ -1,4 +1,65 @@ package ntnu.sytemutvikling.team6.models; +import java.time.LocalDateTime; +import java.util.UUID; + public class Feedback { + /* Feedback id */ + private UUID feedbackId; + + /** + * The author of the feedback + * If annonymous the presentation of the user will be "Anonymous". + */ + private User user; + + /* The details of the feedback*/ + private String comment; + + /* The date and time when the feedback was given */ + private LocalDateTime date; + + /* Is the feedback given anonymously? */ + private boolean isAnonymous; + + /** + * Constructor for creating a new feedback. + * + * @param user The user who gives the feedback. + * @param comment The content of the feedback. + */ + public Feedback(User user, String comment) { + this.feedbackId = UUID.randomUUID(); + this.user = user; + this.comment = comment; + this.date = LocalDateTime.now(); + + // ASSUMES that this is the way to get the anonymous setting from the user's settings. + if (user.getSettings().getAnonymous() == false) { + this.isAnonymous = true; + } else { + this.isAnonymous = false; + } + } + + /** + * Getters for the feedback's attributes. + * + * @return The feedback's attributes. + */ + public UUID getFeedbackId() { + return feedbackId; + } + public String getComment() { + return comment; + } + public LocalDateTime getDate() { + return date; + } + public User getUser() { + return user; + } + public boolean isAnonymous() { + return isAnonymous; + } } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class index 506a404958517c440a6cb791fad051f725ed637b..b2e6c9c9c5e89b2b727aff0dd6431c1df3c3650a 100644 GIT binary patch literal 1559 zcma)5YflqF6g|_H7RvHQ!6zUB?FuXkqR2x`k%WX`lt%*JmUe-Gc5Aj%lKvBagda4q z!D!+S@JAWX3>8Y*1i#F^b7#)EbI-l=`_GSG0N!FbfrvoLSAN+kRg_mKt5bQBm;Rxn zJhw3G6pA@7Uve@>ZXi`9ftWz&v3u$|d6#$I?H_wtB@mH0#@Ee3S;@S!y}hlK@%&p%fV^nM4$Q7JASx5KX0blDLce3EX4-SGBY701qiZ;QF~@L90m>Q|Y=w zjKVDt7_`uYxb_}dNT6AJk1e#Ed!rVTXw|Wl1q*En*aAJ5$=(EkThXE1zYZZ-ZZqBb@Mx%3B9icW9mq<8TQTU)~1QlHXV9ujm>SP z&0O@h_g|$~Cnmv58)l%|>8;d{PZtAQ4HHCxIYV4IIISg5U5-*4ciaBy#b_lri{&8e ztx8>+ReRl}7AZDJ9isdy{3lvwdJ!$Mv6R?Y3T!OpHI||oOBspoGJZE3LgCTN^%f(a z$Qq-avd?ha{*F6U4A@Vq7_!H!7`CHTjOb;|{)zPN8F(^oPgF7a)v!%*9VH_$PL>Jg zpJXnF%u}4Grx?I9*qCNyhC9$Vxfq@1j#*6&!g#uhi1GBhqkP{C9@bvz(CS-F_BRZC zp%Wn#ltBky8EWhNLXBGBIc6ErCDwx{8^MdA;1{9bp+@j>DEMV4c(@Uq2?fuwoa@gX z`P@+RYAD#kdxXxxsJPvBoT zfP@9&zz6VAi0ZbhC7a!3gj0~NHL)~WKEZFM3)_%b+j zl;<`#oo3kZ{FYNbawDlubI1sc9J?p3Z6$qYe}B93R3H<$ zO;2E~dtxBFDk3}23JtGSkK{)s!$4q2h066SVc_b0OF(Q30+st$93Gy;Rc(!JdlN3m}FOx z8#KbE9+9IJOYyM>AaL74AF?{TVk-XRT+3Y z?dE|O?YRfOQ7^2!evJm`eXp2NN0KVp)vH=Z#rqCDwM``pjO8;S$Nx=m*`6FP?HKol zm{l%%HOj(X%q|K?!?@C=Ld#RADo=|nBNWCQQdnj^=ww}W36kYGqcno&3~Ci zO3TMArNuLm(wRu%Or&fkQZz=b;4ntGj&k>jxD4Zx{T*ZW4@`70Wv_HFZLfAPW2ZZq z)60Ur*1^(OL$l0v-cT(QTI3@o(%G263MR3N8LVLu>pTIghMYHS?)Z#pQkYD)nKGGf zEX{^AzT1|=sBiVz-!S!sNecSetSN37YO8ypM=kj98Y_CHi{Pa=cq(R-#JSzJI_Ej08J5qifn_=ti9WW^ctsrP>trq3WV~!N_KbC}Ej?uaftYXvG(Pp!})4@(tI2#oD#85_p7Lbk;~uDy-u+ zS%y2fJC0zIRd<=~uh{rPhZLspiy1ic58lMR1o-|uyq5?+q>4th&t~45hhHVa2DTI6 Zoq4#L2p91r0p9&Q*YmqX_-U+q_7{ow3N-)# delta 132 zcmaFNxtodW)W2Q(7#J8_83ZPBxy!NHWaed-*fBCNYiNcsGO#%3r=)T*Ff(xSFt9SP zO}@n#H(8un#fyP~5eR`IK$0D(TOZ74U|`kS&cLw|D8R(P1tdYz3_#u7K#~W{W(Cr` OKprClACP2X;0FLS9S{uw From d54cb2604501753f11b29a071ae6ecb40b6060a8 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 12:43:20 +0100 Subject: [PATCH 6/6] Maven clean and other fixes --- .../sytemutvikling/team6/models/Charity.java | 7 + .../ntnu/sytemutvikling/team6/Main.class | Bin 568 -> 0 bytes .../sytemutvikling/team6/models/Charity.class | Bin 1559 -> 0 bytes .../team6/models/Donation.class | Bin 1459 -> 0 bytes .../team6/models/DonationRegistry.class | Bin 339 -> 0 bytes .../team6/models/Feedback.class | Bin 1251 -> 0 bytes .../sytemutvikling/team6/models/Inbox.class | Bin 306 -> 0 bytes .../team6/models/Settings.class | Bin 315 -> 0 bytes .../sytemutvikling/team6/models/User.class | Bin 303 -> 0 bytes .../team6/models/UserRegistry.class | Bin 327 -> 0 bytes .../team6/service/AuthenticationService.class | Bin 356 -> 0 bytes .../team6/service/CharityService.class | Bin 335 -> 0 bytes .../team6/service/DonationService.class | Bin 338 -> 0 bytes .../team6/service/FeedbackService.class | Bin 338 -> 0 bytes .../target/classes/tempClassDiagram.puml | 307 ------------------ 15 files changed, 7 insertions(+), 307 deletions(-) delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Feedback.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Settings.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/User.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/AuthenticationService.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/CharityService.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class delete mode 100644 helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class delete mode 100644 helpmehelpapplication/target/classes/tempClassDiagram.puml diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index 3106d09..4a389f4 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -88,4 +88,11 @@ public void setVerified() { public void setUnverified() { this.isVerified = false; } + + /** + * Setter for total donations. This method is used to update the total donations when a new donation is made. + */ + public void setTotalDonations(int amount) { + this.totalDonations += amount; + } } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class deleted file mode 100644 index 9e9f2a33d115763beffd93059907a798c708bb0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 568 zcmaKpyG{a85QhJQ;Iiu~2!i(uR$$?FT3~F9#sV)1hQ{iECwO!(W;v_zv9!>{!Uyo7 zjQ^quAt5$1J2U&wd^6|k`{NV9F}5va1U5nwCf?xLs30+q`rg-J-!n=Ed)}GUp@pnK z@lHNU&zG!RbnjHp2uvU7P@6-6sd}R$kUffSl!GbQE^?R_D718_&Xb_4;w#zpl|ZQ# z^`zgCu}mlvold4jm z1Vv~W_qkqq0<(bAj*_^iPIP)5J3aPpItw+BmM;Wk_{D3|T8un;L7&@sNB(74c4*Tw zD43yje}AB#Wn^Ox1!hw5{;(NyuPBzPZ&(^Na9CnjEV9ht_+_ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class deleted file mode 100644 index b2e6c9c9c5e89b2b727aff0dd6431c1df3c3650a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1559 zcma)5YflqF6g|_H7RvHQ!6zUB?FuXkqR2x`k%WX`lt%*JmUe-Gc5Aj%lKvBagda4q z!D!+S@JAWX3>8Y*1i#F^b7#)EbI-l=`_GSG0N!FbfrvoLSAN+kRg_mKt5bQBm;Rxn zJhw3G6pA@7Uve@>ZXi`9ftWz&v3u$|d6#$I?H_wtB@mH0#@Ee3S;@S!y}hlK@%&p%fV^nM4$Q7JASx5KX0blDLce3EX4-SGBY701qiZ;QF~@L90m>Q|Y=w zjKVDt7_`uYxb_}dNT6AJk1e#Ed!rVTXw|Wl1q*En*aAJ5$=(EkThXE1zYZZ-ZZqBb@Mx%3B9icW9mq<8TQTU)~1QlHXV9ujm>SP z&0O@h_g|$~Cnmv58)l%|>8;d{PZtAQ4HHCxIYV4IIISg5U5-*4ciaBy#b_lri{&8e ztx8>+ReRl}7AZDJ9isdy{3lvwdJ!$Mv6R?Y3T!OpHI||oOBspoGJZE3LgCTN^%f(a z$Qq-avd?ha{*F6U4A@Vq7_!H!7`CHTjOb;|{)zPN8F(^oPgF7a)v!%*9VH_$PL>Jg zpJXnF%u}4Grx?I9*qCNyhC9$Vxfq@1j#*6&!g#uhi1GBhqkP{C9@bvz(CS-F_BRZC zp%Wn#ltBky8EWhNLXBGBIc6ErCDwx{8^MdA;1{9bp+@j>DEMV4c(@Uq2?fuwoa@gX z`P@+RYAD#kd=(``vc&2+Jo0|1y&P?b0&Tanv{pb5n0NZ$0M2^80N+eF)Qanu5ng22H#j&Hf z8?HN{^mq_ERViHMOHsrq!_sorBC_ixO^_}Vl zL%|JYBFK+b8Ad%1fz}rzI zqcL1&IH-$=$1*tMp4E`ysUM^-Vx30vFyP?}%P8$NxfOENl%93W)h<_x9x|@jmLFS* z@c5B02tJaLrN~pYPPwJC8wO@DXJQ&x8D=Z(uG8n;RS`wl(A7=W2!5A@hdkPIDIr5S zeYJghcYW@B992!9Cb>Mk@2;fi6-FxdK?w{CCMGe(U{dv+0ct^&EB2tIwD(;Tc@#){ zboF?v@D8XPb`nefa2>NgR=_n6PjKgFY(|Oxs zwErhYDgqtgiHQkZpfYx45;gc6Ur&0XJF8VK3@nh}2>reV7nRgqc> zmRg!C*&>nCDARh8PHPlJ)5Z_Xd?;V~hAY2P-+5XKgKyz>27Kqs0Q@QwzK6vgoa<$-d>()|GvOsH_uzinD}$N0 iGvQU5MSE)Jdwwto?_|P{@Hhir8-(9x!s}^sPyYh^S3T(f diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class deleted file mode 100644 index 3974903d9496aace76d6a75118cc0b88e270b82e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 339 zcmb7=&q~8U5XQerlSX5;MeqT^Z5nf4wD=S;mifst8Nuc(}yL$S$1<3jBYMe<6n&J)U9_quy>DU z&Ru9%Ia0!8p_f`&EyEAh!qkB(R-#JSzJI_Ej08J5qifn_=ti9WW^ctsrP>trq3WV~!N_KbC}Ej?uaftYXvG(Pp!})4@(tI2#oD#85_p7Lbk;~uDy-u+ zS%y2fJC0zIRd<=~uh{rPhZLspiy1ic58lMR1o-|uyq5?+q>4th&t~45hhHVa2DTI6 Zoq4#L2p91r0p9&Q*YmqX_-U+q_7{ow3N-)# diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class deleted file mode 100644 index 7b4a30611879cd3c018533f5a84546ad7e661ab6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 306 zcma)%Jx;?w5QX13{z;6%5jRK^1q!yK0ns3kB3V!nrC&QM*sxwp_S%ADQ6W)q01kzi zwQ>NOH}mFC-~9Z3eFM0|JV8KMT4#IFy*pL+ZqTnr+h^gFtS?2~?3C%m+Lp~*f{-xZ z%RvewdE&9$tI84LYi+f=Axu_hTS9otJ1HiZWrz?H@r3-vNG!=J`w(?9kD%;xnmF-;g zzhNpbt|y$8{|34w6w7w#YQA%E?evfIJVN3ailmo9D@7F5T%Fl@AUplQ-n#|~3f0(# T4jiaXcJEB$=FOkJ`T70&25^gMiimLTyz5l^?z!sx-n?1kUX*8DEmc)Nvu)K=%T0=yFx~0B zR#wZvL$Tx16Z&i8jK3!IF6Uc9d?PCvdKe6mpih|O#_@eu72G`P!ZKl&*QK^w-I(D2 zi?M$-E#V?R3T8#fHg(sOd}qSRK_I*ea5#gY$aj!P0YNksrw$%S7N0ozkV1q^G_)ZL Sr=r6{o=6;tBaB5OO#T1?phVLE diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class deleted file mode 100644 index 970aced91dfd7f8c243d76c46fae27be61d4a66b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 327 zcmb7*`0ZcK;kr2*pu)Xq|z-=Ga=Cv_)sRHZvQnlSPH(ot?c5_}DAKWHK zN|>zlTB}CO;H+A49SFl~V@TpG*weOs}6)K$ZTqq3`Y zv(U~&|65GMi}3_i{tN1gP&{h~ptY_MvI@B~YdzrDCeetTm7v dy?**VfrqHCxAJ>pJsR82hRm>+)7LTz4jCHCyZ2xb5;6 zV}yk9Mt52jTHY?Q4d;%~zc<#n2SRUpu_A=C>V*^Za6CYSK4Fv^%k#F(xPI1I!GyE4 z%5|}l<(~hVpE?|JqmH7!!z}{2o%tdr8JZYR^D)`GKQ% ZX#_|l{WWCZL~^h{M^aCP2t&yLqaS1GQQrUn diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class deleted file mode 100644 index 86d299609fbed9ef28c2c620209ae857df2bd9fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 338 zcmb7=u};G<5QhItlLkVe72*ZhfB_33v4B_#Oc4x4-JNiPD~Tf|P9z?S35kIR;Gq!b z!o0Uh7y&vSc68C64+xpCO+zwK*xoVvC(zwMB zr-%u&l^v|9tX{q=R$O|*_(GicOTy^ja7l>g%>!o`VRM26W5P5S$G3f5aC>iyiV3@U zQ`%~2TM7KzjQx{zgwy=rV&{Zx(e!P}HxjsY-vu`=S1ta5@AO(!t@){rBfOJ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class deleted file mode 100644 index 4b0e587b06036d7a35cd6fe07ab42099bb8a5b7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 338 zcmb7=u};G<5QhItlLkVeRmBUi0Rt97Vga#Kbc*Ou)ZKAU;5Koj#EHaXF(EPV06Y}p zT$tEc{_}TdTc7Up>-_`3Jtiq4!lm=BQ|*iAs`I_wmexHf&$_x+EjPV2tme$?LYwXK zhf~Ca$wv2Dm0B(@iVYi27~WcE{T*R&dbT3OvwF=L2G}1V!H_V{t>cHTD!6&nMahI| zUK?GmbYlbmHe>&6Tf$ZTZ?PLfwye9x@Z5&)kN=2Y1ZSK;3}pe3O2JGr6;e9}lJht0 by-FiOCK<+%2M3a)-8qqZC`34tj4=KNWkXVR diff --git a/helpmehelpapplication/target/classes/tempClassDiagram.puml b/helpmehelpapplication/target/classes/tempClassDiagram.puml deleted file mode 100644 index c32ad2a..0000000 --- a/helpmehelpapplication/target/classes/tempClassDiagram.puml +++ /dev/null @@ -1,307 +0,0 @@ -@startuml - - - -' ========================= - -' DOMAIN LAYER - -' ========================= - - - -package "Domain Layer" { - - - -class User { - - - idNext : static int - - - id : int - - - name : String - - - email : String - - - passwordHash : String - - - role : String - - - settings : Settings - - - inbox : Inbox - - - - + getUserId() : int - - + setUserId(id : int) - - + getUserName() : String - - + setUserName(name : String) - - + getUserEmail() : String - - + setUserEmail(email : String) - - + getUserPasswordHash() : String - - + setUserPasswordHash(passwordHash : String) - - + getUserRole() : String - - + setUserRole(role : String) - -} - - - -class Settings { - - - lightmode : boolean - - - language : String - - - anonymous : boolean - - - - + getSettings() : String - -} - - - -class Inbox { - - - messages : ArrayList - - - - + getMessages() : ArrayList - - + addMessage(message : Message) - - + removeMessage(message : Message) - -} - - - -class Message { - - - title : String - - - from : Charity - - - date : LocalDateTime - - - - + getTitle() : String - - + getFrom() : Charity - - + getDate() : LocalDateTime - -} - - - -class Charity { - - - idNext : static int - - - id : int - - - name : String - - - description : String - - - totalDonations : double - - - verified : boolean - - - category : String - - - - + getCharityId() : int - - + setCharityId(id : int) - - + getCharityName() : String - - + setCharityName(name : String) - - + getCharityDescription() : String - - + setCharityDescription(description : String) - - + getCharityTotalDonations() : double - - + setCharityTotalDonations(totalDonations : double) - -} - - - -abstract class Donation { - - - idNext : static int - - - id : int - - - amount : double - - - date : LocalDateTime - - - charity : Charity - - - user : User - - - - + getDonationId() : int - - + setDonationId(id : int) - - + getDonationAmount() : double - - + setDonationAmount(amount : double) - - + getDonationDate() : LocalDateTime - - + setDonationDate(date : LocalDateTime) - - + getDonorInfo() : String - -} - - - -class AnonymousDonation { - - - comment : String - -} - - - -class PublicDonation { - - - comment : String - -} - - - -class Feedback { - - - id : int - - - message : String - - - date : LocalDateTime - - - charityId : int - - - - + getId() : int - - + setId(id : int) - - + getMessage() : String - - + setMessage(message : String) - - + getDate() : LocalDateTime - - + setDate(date : LocalDateTime) - -} - - - -class UserRegistry { - - - users : List - - + addUser(user : User) - - + removeUser(user : User) - - + getUserById(id : int) : User - - + getAllUsers() : List - -} - - - -class CharityRegistry { - - - charities : List - - + addCharity(charity : Charity) - - + removeCharity(charity : Charity) - - + getCharityById(id : int) : Charity - - + getAllCharities() : List - -} - - - -class DonationRegistry { - - - donations : List - - + addDonation(donation : Donation) - - + removeDonation(donation : Donation) - - + getDonationById(id : int) : Donation - - + getAllDonations() : List - -} - - - -' Associations - -User "1" -- "0..*" Donation - -Charity "1" -- "0..*" Donation - - - -User "1" -- "0..*" Feedback - -Charity "1" -- "0..*" Feedback - - - -Donation <|-- AnonymousDonation - -Donation <|-- PublicDonation - - - -User "1" *-- "1" Settings - -User "1" *-- "1" Inbox - -Inbox "1" -- "0..*" Message - -Message "1" --> "1" Charity - - - -} \ No newline at end of file