Class HDBOfficerActions

Object
HDBOfficerActions
All Implemented Interfaces:
IUserActions

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

  • Constructor Details

    • HDBOfficerActions

      public HDBOfficerActions()
  • Method Details

    • handleAction

      public static void handleAction(HDBOfficer.Menu option, HDBOfficer user) throws Exception
      Handles user input selection from BTOManagementApplication
      Throws:
      Exception
    • bookApplication

      private static void bookApplication(HDBOfficer officer) throws Exception
      Method to help applicants to book an application for a flat
      Parameters:
      officer - HDB Officer
      Throws:
      Exception - if any error occurs during the booking process
    • enquiriesSystemFlow

      private static void enquiriesSystemFlow(HDBOfficer officer) throws Exception
      Method to handle the enquiries system flow for HDB Officer. This method allows the officer to view the enquiries list, send an enquiry as an applicant, or go back to the main menu.
      Parameters:
      officer - HDB Officer
      Throws:
      Exception - if any error occurs during the enquiries system flow
    • checkProjectApplicationStatus

      private static void checkProjectApplicationStatus(HDBOfficer officer) throws Exception
      Method to check the project application status for HDB Officer as an officer. This method displays the approved and pending projects for the officer.
      Parameters:
      officer - HDB Officer
      Throws:
      Exception - if any error occurs during the project application status check
    • viewProjects

      private static void viewProjects(HDBOfficer officer) throws Exception
      Method to view available projects for HDB Officer as an applicant to join
      Parameters:
      officer - HDB Officer
      Throws:
      Exception - if any error occurs during the project viewing process
    • joinProject

      public static void joinProject(HDBOfficer user) throws Exception
      Method which checks pre-req before letting HDB Officer submit their name for approval for a project.
      Parameters:
      user - HDB Officer
      Throws:
      Exception
    • datesOverlap

      private static boolean datesOverlap(LocalDate start1, LocalDate end1, LocalDate start2, LocalDate end2)
      helper function to check with date overlaps
      Parameters:
      start1 - start date of project officer is handling
      end1 - end date of project officer is handling
      start2 - start date of project officer is applying for
      end2 - end date of project officer is applying for
      Returns:
      true if the two projects overlap, false otherwise