Class HDBManagerActions

Object
HDBManagerActions
All Implemented Interfaces:
IUserActions

public class HDBManagerActions extends Object implements IUserActions
User interactable actions for when logged in user is of HDB Manager role
  • Field Details

  • Constructor Details

    • HDBManagerActions

      public HDBManagerActions()
  • Method Details

    • handleAction

      public static void handleAction(HDBManager.Menu option, HDBManager user) throws Exception
      handle action based on user input, passed in from BTOManagementApplication
      Throws:
      Exception
    • reportsFlow

      private static void reportsFlow(HDBManager manager) throws Exception
      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

      private static void createProject(HDBManager manager) throws Exception
      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

      private static void editProject(HDBManager manager)
      Edit an existing project.
      Parameters:
      manager - The manager editing the project.
    • deleteProject

      private static void deleteProject(HDBManager manager)
      Delete a project from the system.
      Parameters:
      manager - The manager deleting the project.
    • approveRejectApplication

      private static void approveRejectApplication(HDBManager manager) throws Exception
      Approve / reject applicant's application
      Parameters:
      manager -
      Throws:
      Exception
    • approveRejectWithdrawalApplication

      private static void approveRejectWithdrawalApplication(HDBManager manager) throws Exception
      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

      private static void viewAllProjects(HDBManager manager) throws Exception
      View all projects in the system.
      Parameters:
      manager - The manager viewing the projects.
      Throws:
      Exception
    • viewCreatedProjects

      private static void viewCreatedProjects(HDBManager manager)
      View all projects created by the manager.
      Parameters:
      manager - The manager viewing the projects.
    • viewPendingOfficerRequests

      private static void viewPendingOfficerRequests(HDBManager manager) throws Exception
      View pending officer requests for a project and review.
      Parameters:
      manager - The manager viewing the pending officer requests.
      Throws:
      Exception
    • enterEnquiriesFlow

      private static void enterEnquiriesFlow(HDBManager manager) throws Exception
      Enter into enquiries system
      Throws:
      Exception