- java.lang.Object
-
- services.ProjectSupervisorService
-
- All Implemented Interfaces:
IProjectSupervisorService
- Direct Known Subclasses:
ProjectFYPCoordinatorService
public class ProjectSupervisorService extends java.lang.Object implements IProjectSupervisorService
TheProjectSupervisorServiceclass implementsIProjectSupervisorService, providing project-related functionalities for supervisors.
-
-
Constructor Summary
Constructors Constructor Description ProjectSupervisorService()Constructs an instance of theProjectSupervisorServiceclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreateProjects(java.util.ArrayList<Project> projects)Creates new projects from the provided list of projects.java.util.ArrayList<Project>getSubmittedProjects(java.lang.String supervisorID)Retrieves a list of projects submitted by the supervisor with the specified ID.booleanupdateProjectTitle(Project project, java.lang.String title, java.lang.String supervisorID)Updates the title of the specified project if the supervisor ID matches the project's supervisor.booleanupdateRemainingProjectsToUnavailable(java.lang.String supervisorID)Updates the remaining projects of the specified supervisor to unavailable.booleanupdateUnavailableProjectsToAvailable(java.lang.String supervisorID)Updates the unavailable projects of the specified supervisor to available.
-
-
-
Constructor Detail
-
ProjectSupervisorService
public ProjectSupervisorService()
Constructs an instance of theProjectSupervisorServiceclass.
-
-
Method Detail
-
getSubmittedProjects
public java.util.ArrayList<Project> getSubmittedProjects(java.lang.String supervisorID)
Description copied from interface:IProjectSupervisorServiceRetrieves a list of projects submitted by the supervisor with the specified ID.- Specified by:
getSubmittedProjectsin interfaceIProjectSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- an
ArrayListofProjectobjects representing the submitted projects
-
createProjects
public boolean createProjects(java.util.ArrayList<Project> projects)
Description copied from interface:IProjectSupervisorServiceCreates new projects from the provided list of projects.- Specified by:
createProjectsin interfaceIProjectSupervisorService- Parameters:
projects- anArrayListofProjectobjects to be created- Returns:
- true if the projects were created successfully, false otherwise
-
updateProjectTitle
public boolean updateProjectTitle(Project project, java.lang.String title, java.lang.String supervisorID)
Description copied from interface:IProjectSupervisorServiceUpdates the title of the specified project if the supervisor ID matches the project's supervisor.- Specified by:
updateProjectTitlein interfaceIProjectSupervisorService- Parameters:
project- theProjectobject to updatetitle- the new title for the projectsupervisorID- the ID of the supervisor making the update- Returns:
- true if the project title was updated successfully, false otherwise
-
updateRemainingProjectsToUnavailable
public boolean updateRemainingProjectsToUnavailable(java.lang.String supervisorID)
Description copied from interface:IProjectSupervisorServiceUpdates the remaining projects of the specified supervisor to unavailable.- Specified by:
updateRemainingProjectsToUnavailablein interfaceIProjectSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- true if the remaining projects were updated successfully, false otherwise
-
updateUnavailableProjectsToAvailable
public boolean updateUnavailableProjectsToAvailable(java.lang.String supervisorID)
Description copied from interface:IProjectSupervisorServiceUpdates the unavailable projects of the specified supervisor to available.- Specified by:
updateUnavailableProjectsToAvailablein interfaceIProjectSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- true if the unavailable projects were updated successfully, false otherwise
-
-