-
- All Known Implementing Classes:
CsvDataService
public interface IFileDataServiceTheIFileDataServiceinterface 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 booleanexportFYPCoordinatorData(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.booleanexportProjectData(java.lang.String projectsFilePath, java.util.Map<java.lang.Integer,Project> projectMap)Exports project data to the specified file path.booleanexportRequestData(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.booleanexportStudentData(java.lang.String usersFilePath, java.lang.String studentsFilePath, java.util.Map<java.lang.String,Student> studentMap)Exports student data to the specified file paths.booleanexportSupervisorData(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
MapofStudentobjects 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- aMapofStudentobjects 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
MapofSupervisorobjects 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- aMapofSupervisorobjects 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
MapofFYPCoordinatorobjects 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- aMapofFYPCoordinatorobjects 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
MapofProjectobjects 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- aMapofProjectobjects 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
MapofRequestobjects 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- aMapofRequestobjects with their IDs as keys- Returns:
- true if the data was exported successfully, false otherwise
-
-