/** * Accessor for config * * @return ArrayList of strings */ public ArrayList<String> getConfig() { File f = new File(calendar_config); // if config file exists if (f.exists()) { return IO.getConfig(calendar_config); } else { return null; } }
/** * Saves configuration to the calendar_config file * * @param c a list of Strings */ public void updateConfig(ArrayList<String> c) { config = c; IO.saveConfig(config, calendar_config); }
/** * Exports calendar to a specific file * * @param filename a name of a file */ public void exportCalendar(String filename) { IO.saveAppointments(appointments, filename); modified = false; }
/** * Imports calendar from specified location * * @param filename the full path of filename */ public ArrayList<Appointment> importCalendar(String filename) { appointments = (ArrayList<Appointment>) IO.getAppointments(filename); return appointments; }