Module sc2002_fypms
Package interfaces

Interface IFileDataService

  • All Known Implementing Classes:
    CsvDataService

    public interface IFileDataService
    The IFileDataService 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 file
        studentsFilePath - the file path of the students file
        Returns:
        a Map of Student 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 file
        studentsFilePath - the file path of the students file
        studentMap - a Map of Student 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 file
        supervisorFilePath - the file path of the supervisors file
        Returns:
        a Map of Supervisor 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 file
        supervisorsFilePath - the file path of the supervisors file
        supervisorMap - a Map of Supervisor 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 file
        supervisorsFilePath - the file path of the supervisors file
        fypCoordinatorsFilePath - the file path of the FYP Coordinators file
        Returns:
        a Map of FYPCoordinator 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 file
        supervisorsFilePath - the file path of the supervisors file
        fypCoordinatorsFilePath - the file path of the FYP Coordinators file
        fypCoordinatorMap - a Map of FYPCoordinator 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 file
        usersFilePath - the file path of the users file
        studentsFilePath - the file path of the students file
        supervisorsFilePath - the file path of the supervisors file
        fypCoordinatorsFilePath - the file path of the FYP Coordinators file
        Returns:
        a Map of Project 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 file
        projectMap - a Map of Project 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 file
        transferStudentRequestsFilePath - the file path of the transfer student requests file
        changeProjectTitleRequestsFilePath - the file path of the change project title requests file
        Returns:
        a Map of Request 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 file
        transferStudentRequestsFilePath - the file path of the transfer student requests file
        changeProjectTitleRequestsFilePath - the file path of the change project title requests file
        requestMap - a Map of Request objects with their IDs as keys
        Returns:
        true if the data was exported successfully, false otherwise