Class ApplicantPage
java.lang.Object
boundary.ApplicantPage
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisplays the main menu options available to the logged-in applicant.static voidHandles the process for an applicant to apply for a specific project.static voidAllows the applicant to delete an existing query they submitted.static voidAllows the applicant to edit an existing query they submitted.static voidquery()Allows the applicant to submit a query regarding a specific project.static voidDisplays projects that the currently logged-in applicant is eligible to apply for, potentially based on filters or eligibility criteria handled by the ApplicantController.static voidDisplays details of the applications submitted by the currently logged-in applicant.static voidDisplays the projects for which the currently logged-in applicant has submitted an application.static voidDisplays the queries submitted by the currently logged-in applicant.static voidHandles the process for an applicant to withdraw their application from a project.
-
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.
-