- java.lang.Object
-
- controllers.UserController
-
- controllers.SupervisorController
-
- controllers.FYPCoordinatorController
-
public class FYPCoordinatorController extends SupervisorController
TheFYPCoordinatorController
class extendsSupervisorController
and provides utility methods for managing the FYP Coordinator user role within the application. This class utilizesIRequestFYPCoordinatorService
andIProjectFYPCoordinatorService
to interact with the underlying data and perform necessary operations.
-
-
Field Summary
Fields Modifier and Type Field Description private static IProjectFYPCoordinatorService
projectFYPCoordinatorService
An instance of theIProjectFYPCoordinatorService
interface used to perform operations related to projects in the FYPMS system.private static IRequestFYPCoordinatorService
requestFYPCoordinatorService
An instance of theIRequestFYPCoordinatorService
interface used to perform operations related to requests in the FYPMS system.private static java.util.Scanner
sc
Scanner
object 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 theFYPCoordinatorController
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.void
start()
Starts the FYP Coordinator menu and prompts the user to select an action.private void
updateAvailabilityOfProjects(Request request)
A utility function that updates the availability of projects after a request (allocate, transfer, deregister) has been completed.protected void
viewApproveRejectPendingRequest()
Overrides theSupervisorController
's method for viewing, approving, and rejecting pending requests.protected void
viewProjects()
Displays all projectsprivate void
viewProjectsByFilter()
Displays all projects with filters applied.protected void
viewRequests()
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
Scanner
object to get input from the user.
-
requestFYPCoordinatorService
private static final IRequestFYPCoordinatorService requestFYPCoordinatorService
An instance of theIRequestFYPCoordinatorService
interface used to perform operations related to requests in the FYPMS system.
-
projectFYPCoordinatorService
private static final IProjectFYPCoordinatorService projectFYPCoordinatorService
An instance of theIProjectFYPCoordinatorService
interface used to perform operations related to projects in the FYPMS system.
-
-
Constructor Detail
-
FYPCoordinatorController
public FYPCoordinatorController()
Constructs an instance of theFYPCoordinatorController
class.
-
-
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:
start
in 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:
viewApproveRejectPendingRequest
in 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
- ARequest
object 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:
viewProjects
in classSupervisorController
-
viewRequests
protected void viewRequests()
Displays all requests- Overrides:
viewRequests
in classSupervisorController
-
-