Package interfaces

Interface IFileDataService

  • All Known Implementing Classes:
    CsvDataService

    public interface IFileDataService
    The IFileDataService interface defines a contract for classes that handle the import and export of data related to users, camps, enquiries, and suggestions. Implementations of this interface should provide methods to import and export data for students, staff, committees, camps, enquiries, and suggestions.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exportCampData​(java.lang.String campsFilePath, java.util.Map<java.lang.Integer,​Camp> campMap)
      Exports camp data to the specified file.
      boolean exportCommitteeData​(java.lang.String usersFilePath, java.lang.String committeesFilePath, java.util.Map<java.lang.String,​Committee> committeeMap)
      Exports committee data to specified files.
      boolean exportEnquiryData​(java.lang.String inquiryFilePath, java.util.Map<java.lang.Integer,​Enquiry> enquiryMap)
      Exports enquiry data to the specified file.
      boolean exportStaffData​(java.lang.String usersFilePath, java.lang.String staffsFilePath, java.util.Map<java.lang.String,​Staff> staffMap)
      Exports staff data to specified files.
      boolean exportStudentData​(java.lang.String usersFilePath, java.lang.String studentsFilePath, java.util.Map<java.lang.String,​Student> studentMap)
      Exports student data to specified files.
      boolean exportSuggestionData​(java.lang.String enquiryFilePath, java.util.Map<java.lang.Integer,​Suggestion> suggestionMap)
      Exports suggestion data to the specified file.
      java.util.Map<java.lang.Integer,​Camp> importCampData​(java.lang.String campsFilePath)
      Imports camp data from the specified file.
      java.util.Map<java.lang.String,​Committee> importCommitteeData​(java.lang.String usersFilePath, java.lang.String committeesFilePath)
      Imports committee data from specified files.
      java.util.Map<java.lang.Integer,​Enquiry> importEnquiryData​(java.lang.String inquiryFilePath)
      Imports enquiry data from the specified file.
      java.util.Map<java.lang.String,​Staff> importStaffData​(java.lang.String usersFilePath, java.lang.String staffsFilePath)
      Imports staff data from specified files.
      java.util.Map<java.lang.String,​Student> importStudentData​(java.lang.String usersFilePath, java.lang.String studentsFilePath)
      Imports student data from specified files.
      java.util.Map<java.lang.Integer,​Suggestion> importSuggestionData​(java.lang.String enquiryFilePath)
      Imports suggestion data from the specified file.
    • Method Detail

      • importStudentData

        java.util.Map<java.lang.String,​Student> importStudentData​(java.lang.String usersFilePath,
                                                                        java.lang.String studentsFilePath)
        Imports student data from specified files.
        Parameters:
        usersFilePath - The file path for user data.
        studentsFilePath - The file path for student data.
        Returns:
        A Map containing Student data with user 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 specified files.
        Parameters:
        usersFilePath - The file path for user data.
        studentsFilePath - The file path for student data.
        studentMap - A Map containing Student data with user IDs as keys.
        Returns:
        true if the export is successful, false otherwise.
      • importStaffData

        java.util.Map<java.lang.String,​Staff> importStaffData​(java.lang.String usersFilePath,
                                                                    java.lang.String staffsFilePath)
        Imports staff data from specified files.
        Parameters:
        usersFilePath - The file path for user data.
        staffsFilePath - The file path for staff data.
        Returns:
        A Map containing Staff data with user IDs as keys.
      • exportStaffData

        boolean exportStaffData​(java.lang.String usersFilePath,
                                java.lang.String staffsFilePath,
                                java.util.Map<java.lang.String,​Staff> staffMap)
        Exports staff data to specified files.
        Parameters:
        usersFilePath - The file path for user data.
        staffsFilePath - The file path for staff data.
        staffMap - A Map containing Staff data with user IDs as keys.
        Returns:
        true if the export is successful, false otherwise.
      • importCommitteeData

        java.util.Map<java.lang.String,​Committee> importCommitteeData​(java.lang.String usersFilePath,
                                                                            java.lang.String committeesFilePath)
        Imports committee data from specified files.
        Parameters:
        usersFilePath - The file path for user data.
        committeesFilePath - The file path for committee data.
        Returns:
        A Map containing Committee data with user IDs as keys.
      • exportCommitteeData

        boolean exportCommitteeData​(java.lang.String usersFilePath,
                                    java.lang.String committeesFilePath,
                                    java.util.Map<java.lang.String,​Committee> committeeMap)
        Exports committee data to specified files.
        Parameters:
        usersFilePath - The file path for user data.
        committeesFilePath - The file path for committee data.
        committeeMap - A Map containing Committee data with user IDs as keys.
        Returns:
        true if the export is successful, false otherwise.
      • importCampData

        java.util.Map<java.lang.Integer,​Camp> importCampData​(java.lang.String campsFilePath)
        Imports camp data from the specified file.
        Parameters:
        campsFilePath - The file path for camp data.
        Returns:
        A Map containing Camp data with camp IDs as keys.
      • exportCampData

        boolean exportCampData​(java.lang.String campsFilePath,
                               java.util.Map<java.lang.Integer,​Camp> campMap)
        Exports camp data to the specified file.
        Parameters:
        campsFilePath - The file path for camp data.
        campMap - A Map containing Camp data with camp IDs as keys.
        Returns:
        true if the export is successful, false otherwise.
      • importEnquiryData

        java.util.Map<java.lang.Integer,​Enquiry> importEnquiryData​(java.lang.String inquiryFilePath)
        Imports enquiry data from the specified file.
        Parameters:
        inquiryFilePath - The file path for enquiry data.
        Returns:
        A Map containing Enquiry data with enquiry IDs as keys.
      • exportEnquiryData

        boolean exportEnquiryData​(java.lang.String inquiryFilePath,
                                  java.util.Map<java.lang.Integer,​Enquiry> enquiryMap)
        Exports enquiry data to the specified file.
        Parameters:
        inquiryFilePath - The file path for enquiry data.
        enquiryMap - A Map containing Enquiry data with enquiry IDs as keys.
        Returns:
        true if the export is successful, false otherwise.
      • importSuggestionData

        java.util.Map<java.lang.Integer,​Suggestion> importSuggestionData​(java.lang.String enquiryFilePath)
        Imports suggestion data from the specified file.
        Parameters:
        enquiryFilePath - The file path for suggestion data.
        Returns:
        A Map containing Suggestion data with suggestion IDs as keys.
      • exportSuggestionData

        boolean exportSuggestionData​(java.lang.String enquiryFilePath,
                                     java.util.Map<java.lang.Integer,​Suggestion> suggestionMap)
        Exports suggestion data to the specified file.
        Parameters:
        enquiryFilePath - The file path for suggestion data.
        suggestionMap - A Map containing Suggestion data with suggestion IDs as keys.
        Returns:
        true if the export is successful, false otherwise.