Package sc2002.FCS1.grp2
Class HDBManagerActions
Object
HDBManagerActions
- All Implemented Interfaces:
IUserActions
User interactable actions for when logged in user is of HDB Manager role
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidapproveRejectApplication(HDBManager manager) Approve / reject applicant's applicationprivate static voidTo approve or reject withdrawal application made by applicant by default if applicant submit a withdrawal application it is successful, unless otherwise rejected manually by manager.private static booleancheckProjectCreationEligibility(LocalDate openingDate, LocalDate closingDate) Check if the project creation is eligible based on the opening and closing dates.private static voidcreateProject(HDBManager manager) Create a new project and add it to the system.private static voiddeleteProject(HDBManager manager) Delete a project from the system.private static voideditProject(HDBManager manager) Edit an existing project.private static voidenterEnquiriesFlow(HDBManager manager) Enter into enquiries systemstatic voidhandleAction(HDBManager.Menu option, HDBManager user) handle action based on user input, passed in fromBTOManagementApplicationprivate static voidreportsFlow(HDBManager manager) Flow to view reports for managerprivate static voidviewAllProjects(HDBManager manager) View all projects in the system.private static voidviewCreatedProjects(HDBManager manager) View all projects created by the manager.private static voidviewPendingOfficerRequests(HDBManager manager) View pending officer requests for a project and review.
-
Field Details
-
system
-
-
Constructor Details
-
HDBManagerActions
public HDBManagerActions()
-
-
Method Details
-
handleAction
handle action based on user input, passed in fromBTOManagementApplication- Throws:
Exception
-
reportsFlow
Flow to view reports for manager- Parameters:
manager-- Throws:
Exception
-
checkProjectCreationEligibility
private static boolean checkProjectCreationEligibility(LocalDate openingDate, LocalDate closingDate) Check if the project creation is eligible based on the opening and closing dates. The project can only be created if there are no other projects that are on the same period (inclusive).- Parameters:
openingDate- Opening date of the new project.closingDate- Closing date of the new project.- Returns:
- true if the project can be created, false otherwise.
-
createProject
Create a new project and add it to the system.- Parameters:
manager- The manager creating the project.- Throws:
Exception- If there is an error during project creation or adding the new project to the system.
-
editProject
Edit an existing project.- Parameters:
manager- The manager editing the project.
-
deleteProject
Delete a project from the system.- Parameters:
manager- The manager deleting the project.
-
approveRejectApplication
Approve / reject applicant's application- Parameters:
manager-- Throws:
Exception
-
approveRejectWithdrawalApplication
To approve or reject withdrawal application made by applicant by default if applicant submit a withdrawal application it is successful, unless otherwise rejected manually by manager.- Parameters:
manager-- Throws:
Exception
-
viewAllProjects
View all projects in the system.- Parameters:
manager- The manager viewing the projects.- Throws:
Exception
-
viewCreatedProjects
View all projects created by the manager.- Parameters:
manager- The manager viewing the projects.
-
viewPendingOfficerRequests
View pending officer requests for a project and review.- Parameters:
manager- The manager viewing the pending officer requests.- Throws:
Exception
-
enterEnquiriesFlow
Enter into enquiries system- Throws:
Exception
-