-
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.
feat: created AppState to keep track of the state of the application
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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,36 @@ | ||
| package edu.group5.app.model; | ||
|
|
||
| import edu.group5.app.model.organization.Organization; | ||
| import edu.group5.app.model.user.User; | ||
|
|
||
| import java.math.BigDecimal; | ||
|
|
||
| public class AppState { | ||
| private User currentUser; | ||
| private BigDecimal currentDonationAmount; | ||
| private Organization currentOrganization; | ||
|
|
||
| public User getCurrentUser() { | ||
| return this.currentUser; | ||
| } | ||
|
|
||
| public void setCurrentUser(User user) { | ||
| this.currentUser = user; | ||
| } | ||
|
|
||
| public Organization getCurrentOrganization() { | ||
| return this.currentOrganization; | ||
| } | ||
|
|
||
| public void setCurrentOrganization(Organization organization) { | ||
| this.currentOrganization = organization; | ||
| } | ||
|
|
||
| public BigDecimal getCurrentDonationAmount() { | ||
| return this.currentDonationAmount; | ||
| } | ||
|
|
||
| public void setCurrentDonationAmount(BigDecimal amount) { | ||
| this.currentDonationAmount = amount; | ||
| } | ||
| } |