Class ApplicantPage

java.lang.Object
boundary.ApplicantPage

public class ApplicantPage extends Object
Represents the boundary layer for handling applicant interactions and displaying the applicant menu. This class provides static methods to navigate different applicant functionalities like viewing projects, applying, managing applications, handling queries, and setting filters.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Displays the main menu options available to the logged-in applicant.
    static void
    Handles the process for an applicant to apply for a specific project.
    static void
    Allows the applicant to delete an existing query they submitted.
    static void
    Allows the applicant to edit an existing query they submitted.
    static void
    Allows the applicant to submit a query regarding a specific project.
    static void
    Displays projects that the currently logged-in applicant is eligible to apply for, potentially based on filters or eligibility criteria handled by the ApplicantController.
    static void
    Displays details of the applications submitted by the currently logged-in applicant.
    static void
    Displays the projects for which the currently logged-in applicant has submitted an application.
    static void
    Displays the queries submitted by the currently logged-in applicant.
    static void
    Handles the process for an applicant to withdraw their application from a project.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApplicantPage

      public ApplicantPage()
  • Method Details

    • allOptions

      public static void allOptions()
      Displays the main menu options available to the logged-in applicant. Reads the applicant's choice and navigates to the corresponding functionality. Handles invalid input and loops back to the main menu or exits the application.
    • viewApplicableProject

      public static void viewApplicableProject()
      Displays projects that the currently logged-in applicant is eligible to apply for, potentially based on filters or eligibility criteria handled by the ApplicantController. After displaying, loops back to the applicant menu.
    • viewAppliedProject

      public static void viewAppliedProject()
      Displays the projects for which the currently logged-in applicant has submitted an application. After displaying, loops back to the applicant menu.
    • viewAppliedApplication

      public static void viewAppliedApplication()
      Displays details of the applications submitted by the currently logged-in applicant. After displaying, loops back to the applicant menu.
    • applyProject

      public static void applyProject()
      Handles the process for an applicant to apply for a specific project. Checks if the applicant has already applied for a project. Prompts for the project ID, checks project existence and applicant eligibility (age, marital status). Prompts for the desired flat type based on eligibility. Delegates the actual application logic to ApplicantController. Handles potential ProjectNotFoundException if the entered project ID is invalid. Loops back to the applicant menu afterwards.
    • withdrawApplication

      public static void withdrawApplication()
      Handles the process for an applicant to withdraw their application from a project. Prompts for the project ID from which to withdraw. Delegates the withdrawal logic to ApplicantController. Handles potential ProjectNotFoundException if the entered project ID is invalid or the applicant hasn't applied to that project. Loops back to the applicant menu afterwards.
    • query

      public static void query()
      Allows the applicant to submit a query regarding a specific project. Prompts for the project ID and checks if it exists. Prompts for the query text. Delegates the query submission logic to ApplicantController. Loops back to the applicant menu afterwards.
    • viewQuery

      public static void viewQuery()
      Displays the queries submitted by the currently logged-in applicant. Delegates the display logic to ApplicantController. Loops back to the applicant menu afterwards.
    • editQuery

      public static void editQuery()
      Allows the applicant to edit an existing query they submitted. Prompts for the request ID (query ID) of the query to edit. Validates if the query exists and belongs to the applicant via ApplicantController. Prompts for the new query text. Delegates the editing logic to ApplicantController. Loops back to the applicant menu afterwards.
    • deleteQuery

      public static void deleteQuery()
      Allows the applicant to delete an existing query they submitted. Prompts for the request ID (query ID) of the query to delete. Delegates the deletion logic (including necessary checks) to ApplicantController. Loops back to the applicant menu afterwards.