-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from cathrkri/example1
models based on current class diagram
- Loading branch information
Showing
25 changed files
with
641 additions
and
2 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/AnonymousDonation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class AnonymousDonation extends Donation { | ||
| } |
2 changes: 1 addition & 1 deletion
2
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class Charity { | ||
| abstract class Charity { | ||
| } |
Empty file.
5 changes: 5 additions & 0 deletions
5
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/DonationRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class DonationRegistry { | ||
|
|
||
| } |
3 changes: 2 additions & 1 deletion
3
...tnu/sytemutvikling/team6/models/Role.java → ...nu/sytemutvikling/team6/models/Inbox.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class Role { | ||
| public class Inbox { | ||
|
|
||
| } |
Empty file.
5 changes: 5 additions & 0 deletions
5
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/PublicDonation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class PublicDonation extends Donation { | ||
|
|
||
| } |
5 changes: 5 additions & 0 deletions
5
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Settings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class Settings { | ||
|
|
||
| } |
5 changes: 5 additions & 0 deletions
5
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/UserRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| public class UserRegistry { | ||
|
|
||
| } |
307 changes: 307 additions & 0 deletions
307
helpmehelpapplication/src/main/resources/tempClassDiagram.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,307 @@ | ||
| @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 | ||
|
|
||
|
|
||
|
|
||
| } |
Binary file added
BIN
+367 Bytes
...mehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/AnonymousDonation.class
Binary file not shown.
Binary file added
BIN
+312 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class
Binary file not shown.
Binary file added
BIN
+315 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class
Binary file not shown.
Binary file added
BIN
+339 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class
Binary file not shown.
Binary file added
BIN
+315 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Feedback.class
Binary file not shown.
Binary file added
BIN
+306 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class
Binary file not shown.
Binary file added
BIN
+358 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/PublicDonation.class
Binary file not shown.
Binary file added
BIN
+315 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Settings.class
Binary file not shown.
Binary file added
BIN
+303 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/User.class
Binary file not shown.
Binary file added
BIN
+327 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class
Binary file not shown.
Binary file added
BIN
+356 Bytes
...papplication/target/classes/ntnu/sytemutvikling/team6/service/AuthenticationService.class
Binary file not shown.
Binary file added
BIN
+335 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/CharityService.class
Binary file not shown.
Binary file added
BIN
+338 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class
Binary file not shown.
Binary file added
BIN
+338 Bytes
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class
Binary file not shown.
Oops, something went wrong.