- java.lang.Object
-
- controllers.UserController
-
- controllers.SupervisorController
-
- controllers.FYPCoordinatorController
-
public class FYPCoordinatorController extends SupervisorController
TheFYPCoordinatorControllerclass extendsSupervisorControllerand provides utility methods for managing the FYP Coordinator user role within the application. This class utilizesIRequestFYPCoordinatorServiceandIProjectFYPCoordinatorServiceto interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description private static IProjectFYPCoordinatorServiceprojectFYPCoordinatorServiceAn instance of theIProjectFYPCoordinatorServiceinterface used to perform operations related to projects in the FYPMS system.private static IRequestFYPCoordinatorServicerequestFYPCoordinatorServiceAn instance of theIRequestFYPCoordinatorServiceinterface used to perform operations related to requests in the FYPMS system.private static java.util.ScannerscScannerobject to get input from the user.-
Fields inherited from class controllers.SupervisorController
projectSupervisorService, projectView, requestSupervisorService, requestView
-
-
Constructor Summary
Constructors Constructor Description FYPCoordinatorController()Constructs an instance of theFYPCoordinatorControllerclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidlogMaxCapacityReached()Logs a message indicating that a supervisor's maximum project capacity has been reached adn that remaining available projects are now unavailable.private voidlogMaxCapacityUnreached()Logs a message indicating that a supervisor's maximum project capacity has not been reached and that unavailable projects are not available.private voidlogSupervisorStatus(java.lang.String name, java.lang.String id, int numOfProjects)Logs the status of the supervisor, including their name, ID, and the number of projects they are currently supervising.voidstart()Starts the FYP Coordinator menu and prompts the user to select an action.private voidupdateAvailabilityOfProjects(Request request)A utility function that updates the availability of projects after a request (allocate, transfer, deregister) has been completed.protected voidviewApproveRejectPendingRequest()Overrides theSupervisorController's method for viewing, approving, and rejecting pending requests.protected voidviewProjects()Displays all projectsprivate voidviewProjectsByFilter()Displays all projects with filters applied.protected voidviewRequests()Displays all requests-
Methods inherited from class controllers.SupervisorController
createProjects, displayRequests, requestStudentTransfer, updateProject
-
Methods inherited from class controllers.UserController
changePassword
-
-
-
-
Field Detail
-
sc
private static final java.util.Scanner sc
Scannerobject to get input from the user.
-
requestFYPCoordinatorService
private static final IRequestFYPCoordinatorService requestFYPCoordinatorService
An instance of theIRequestFYPCoordinatorServiceinterface used to perform operations related to requests in the FYPMS system.
-
projectFYPCoordinatorService
private static final IProjectFYPCoordinatorService projectFYPCoordinatorService
An instance of theIProjectFYPCoordinatorServiceinterface used to perform operations related to projects in the FYPMS system.
-
-
Constructor Detail
-
FYPCoordinatorController
public FYPCoordinatorController()
Constructs an instance of theFYPCoordinatorControllerclass.
-
-
Method Detail
-
start
public void start()
Starts the FYP Coordinator menu and prompts the user to select an action. The method loops until the user chooses to exit the FYP Coordinator menu.- Overrides:
startin classSupervisorController
-
viewProjectsByFilter
private void viewProjectsByFilter()
Displays all projects with filters applied.
-
viewApproveRejectPendingRequest
protected void viewApproveRejectPendingRequest()
Overrides theSupervisorController's method for viewing, approving, and rejecting pending requests. This implementation is tailored for the FYP Coordinator role, handling additional request types and updating project availability when necessary.- Overrides:
viewApproveRejectPendingRequestin classSupervisorController
-
updateAvailabilityOfProjects
private void updateAvailabilityOfProjects(Request request)
A utility function that updates the availability of projects after a request (allocate, transfer, deregister) has been completed.- Parameters:
request- ARequestobject representing the request.
-
logSupervisorStatus
private void logSupervisorStatus(java.lang.String name, java.lang.String id, int numOfProjects)Logs the status of the supervisor, including their name, ID, and the number of projects they are currently supervising.- Parameters:
name- The supervisor's name.id- The supervisor's ID.numOfProjects- The number of projects the supervisor is currently supervising.
-
logMaxCapacityReached
private void logMaxCapacityReached()
Logs a message indicating that a supervisor's maximum project capacity has been reached adn that remaining available projects are now unavailable.
-
logMaxCapacityUnreached
private void logMaxCapacityUnreached()
Logs a message indicating that a supervisor's maximum project capacity has not been reached and that unavailable projects are not available.
-
viewProjects
protected void viewProjects()
Displays all projects- Overrides:
viewProjectsin classSupervisorController
-
viewRequests
protected void viewRequests()
Displays all requests- Overrides:
viewRequestsin classSupervisorController
-
-