-
- All Known Implementing Classes:
CsvDataService
public interface IFileDataService
TheIFileDataService
interface defines a contract for importing and exporting data to and from files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exportFYPCoordinatorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath, java.util.Map<java.lang.String,FYPCoordinator> fypCoordinatorMap)
Exports FYP Coordinator data to the specified file paths.boolean
exportProjectData(java.lang.String projectsFilePath, java.util.Map<java.lang.Integer,Project> projectMap)
Exports project data to the specified file path.boolean
exportRequestData(java.lang.String requestsFilePath, java.lang.String transferStudentRequestsFilePath, java.lang.String changeProjectTitleRequestsFilePath, java.util.Map<java.lang.Integer,Request> requestMap)
Exports request data to the specified file paths.boolean
exportStudentData(java.lang.String usersFilePath, java.lang.String studentsFilePath, java.util.Map<java.lang.String,Student> studentMap)
Exports student data to the specified file paths.boolean
exportSupervisorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.util.Map<java.lang.String,Supervisor> supervisorMap)
Exports supervisor data to the specified file paths.java.util.Map<java.lang.String,FYPCoordinator>
importFYPCoordinatorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath)
Imports FYP Coordinator data from the specified file paths.java.util.Map<java.lang.Integer,Project>
importProjectData(java.lang.String projectsFilePath, java.lang.String usersFilePath, java.lang.String studentsFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath)
Imports project data from the specified file paths.java.util.Map<java.lang.Integer,Request>
importRequestData(java.lang.String requestsFilePath, java.lang.String transferStudentRequestsFilePath, java.lang.String changeProjectTitleRequestsFilePath)
Imports request data from the specified file paths.java.util.Map<java.lang.String,Student>
importStudentData(java.lang.String usersFilePath, java.lang.String studentsFilePath)
Imports student data from the specified file paths.java.util.Map<java.lang.String,Supervisor>
importSupervisorData(java.lang.String usersFilePath, java.lang.String supervisorFilePath)
Imports supervisor data from the specified file paths.
-
-
-
Method Detail
-
importStudentData
java.util.Map<java.lang.String,Student> importStudentData(java.lang.String usersFilePath, java.lang.String studentsFilePath)
Imports student data from the specified file paths.- Parameters:
usersFilePath
- the file path of the users filestudentsFilePath
- the file path of the students file- Returns:
- a
Map
ofStudent
objects with their IDs as keys
-
exportStudentData
boolean exportStudentData(java.lang.String usersFilePath, java.lang.String studentsFilePath, java.util.Map<java.lang.String,Student> studentMap)
Exports student data to the specified file paths.- Parameters:
usersFilePath
- the file path of the users filestudentsFilePath
- the file path of the students filestudentMap
- aMap
ofStudent
objects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
importSupervisorData
java.util.Map<java.lang.String,Supervisor> importSupervisorData(java.lang.String usersFilePath, java.lang.String supervisorFilePath)
Imports supervisor data from the specified file paths.- Parameters:
usersFilePath
- the file path of the users filesupervisorFilePath
- the file path of the supervisors file- Returns:
- a
Map
ofSupervisor
objects with their IDs as keys
-
exportSupervisorData
boolean exportSupervisorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.util.Map<java.lang.String,Supervisor> supervisorMap)
Exports supervisor data to the specified file paths.- Parameters:
usersFilePath
- the file path of the users filesupervisorsFilePath
- the file path of the supervisors filesupervisorMap
- aMap
ofSupervisor
objects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
importFYPCoordinatorData
java.util.Map<java.lang.String,FYPCoordinator> importFYPCoordinatorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath)
Imports FYP Coordinator data from the specified file paths.- Parameters:
usersFilePath
- the file path of the users filesupervisorsFilePath
- the file path of the supervisors filefypCoordinatorsFilePath
- the file path of the FYP Coordinators file- Returns:
- a
Map
ofFYPCoordinator
objects with their IDs as keys
-
exportFYPCoordinatorData
boolean exportFYPCoordinatorData(java.lang.String usersFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath, java.util.Map<java.lang.String,FYPCoordinator> fypCoordinatorMap)
Exports FYP Coordinator data to the specified file paths.- Parameters:
usersFilePath
- the file path of the users filesupervisorsFilePath
- the file path of the supervisors filefypCoordinatorsFilePath
- the file path of the FYP Coordinators filefypCoordinatorMap
- aMap
ofFYPCoordinator
objects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
importProjectData
java.util.Map<java.lang.Integer,Project> importProjectData(java.lang.String projectsFilePath, java.lang.String usersFilePath, java.lang.String studentsFilePath, java.lang.String supervisorsFilePath, java.lang.String fypCoordinatorsFilePath)
Imports project data from the specified file paths.- Parameters:
projectsFilePath
- the file path of the projects fileusersFilePath
- the file path of the users filestudentsFilePath
- the file path of the students filesupervisorsFilePath
- the file path of the supervisors filefypCoordinatorsFilePath
- the file path of the FYP Coordinators file- Returns:
- a
Map
ofProject
objects with their IDs as keys
-
exportProjectData
boolean exportProjectData(java.lang.String projectsFilePath, java.util.Map<java.lang.Integer,Project> projectMap)
Exports project data to the specified file path.- Parameters:
projectsFilePath
- the file path of the projects fileprojectMap
- aMap
ofProject
objects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
importRequestData
java.util.Map<java.lang.Integer,Request> importRequestData(java.lang.String requestsFilePath, java.lang.String transferStudentRequestsFilePath, java.lang.String changeProjectTitleRequestsFilePath)
Imports request data from the specified file paths.- Parameters:
requestsFilePath
- the file path of the requests filetransferStudentRequestsFilePath
- the file path of the transfer student requests filechangeProjectTitleRequestsFilePath
- the file path of the change project title requests file- Returns:
- a
Map
ofRequest
objects with their IDs as keys
-
exportRequestData
boolean exportRequestData(java.lang.String requestsFilePath, java.lang.String transferStudentRequestsFilePath, java.lang.String changeProjectTitleRequestsFilePath, java.util.Map<java.lang.Integer,Request> requestMap)
Exports request data to the specified file paths.- Parameters:
requestsFilePath
- the file path of the requests filetransferStudentRequestsFilePath
- the file path of the transfer student requests filechangeProjectTitleRequestsFilePath
- the file path of the change project title requests filerequestMap
- aMap
ofRequest
objects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
-