Package main.boundary.modelviewer
Class ProjectViewer
java.lang.Object
main.boundary.modelviewer.ProjectViewer
Displays the project details.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidPrompts the user to enter a project ID and displays the details of the project with the matching ID using the ProjectRepository and Project object's displayProject() method.static voidPrompts the user to select a project status and displays the details of projects with the matching status.static voidPrompts the user to enter a student ID and displays the details of projects that require the student with the matching ID.static voidPrompts the user to enter a supervisor ID and displays the details of projects supervised by the supervisor with the matching ID.static voidProvides a menu to the user to select the way to search for project details and calls the corresponding method based on the user's selection.static ProjectStatusDisplays a menu to the user to select a project status and returns the selected ProjectStatus enum value.static voidDisplays the project details.static voidviewAvailableProjectList(Student student) Displays the project details.static voidviewStudentProject(Student student) Displays the project details.
- 
Constructor Details- 
ProjectViewerpublic ProjectViewer()
 
- 
- 
Method Details- 
getProjectStatusDisplays a menu to the user to select a project status and returns the selected ProjectStatus enum value. If an invalid option is selected, it prompts the user to retry or go back, and throws a PageBackException if the user chooses to go back.- Returns:
- the selected ProjectStatus enum value.
- Throws:
- PageBackException- if the user chooses to go back to the previous page.
 
- 
generateDetailsByProjectIDPrompts the user to enter a project ID and displays the details of the project with the matching ID using the ProjectRepository and Project object's displayProject() method.- Throws:
- PageBackException- if the user chooses to go back to the previous page.
 
- 
generateDetailsBySupervisorIDPrompts the user to enter a supervisor ID and displays the details of projects supervised by the supervisor with the matching ID. It checks if the supervisor ID is valid using the FacultyRepository and handles cases where the supervisor is not found or the user wants to go back by throwing a PageBackException.- Throws:
- PageBackException- if the user wants to go back
 
- 
generateDetailsByStudentIDPrompts the user to enter a student ID and displays the details of projects that require the student with the matching ID. It uses the ProjectRepository to find projects that match the student ID and calls the displayProject() method on each project to display their details. It also handles cases where no projects are found and prompts the user to go back using a PageBackException.- Throws:
- PageBackException- if the user wants to go back
 
- 
generateDetailsByStatusPrompts the user to select a project status and displays the details of projects with the matching status. It calls the getProjectStatus() method to get the selected status, and uses the ProjectRepository to find projects that match the status. It handles cases where no projects are found and prompts the user to go back using a PageBackException.- Throws:
- PageBackException- if the user wants to go back
 
- 
generateProjectDetailsProvides a menu to the user to select the way to search for project details and calls the corresponding method based on the user's selection. It also handles cases where the user wants to go back by calling the ChangePage.changePage() method and throwing a PageBackException.- Throws:
- PageBackException- if the user wants to go back
 
- 
viewAvailableProjectListDisplays the project details.- Parameters:
- student- the student to display the project details for
- Throws:
- PageBackException- if the user wants to go back
 
- 
viewAllProjectDisplays the project details.- Throws:
- PageBackException- if the user wants to go back
 
- 
viewStudentProjectDisplays the project details.- Parameters:
- student- the student
- Throws:
- PageBackException- if the user wants to go back
 
 
-