Search in sources :

Example 1 with CalendarRow

use of de.tum.in.tumcampusapp.component.tumui.calendar.model.CalendarRow in project TumCampusApp by TCA-Team.

the class CalendarController method importCalendar.

public void importCalendar(CalendarRowSet myCalendarList) {
    // Cleanup cache before importing
    removeCache();
    // reading xml
    List<CalendarRow> myCalendar = myCalendarList.getKalendarList();
    if (myCalendar != null) {
        for (CalendarRow row : myCalendar) {
            // insert into database
            try {
                replaceIntoDb(row);
            } catch (Exception e) {
                Utils.log(e);
            }
        }
    }
    new SyncManager(mContext).replaceIntoDb(Const.SYNC_CALENDAR_IMPORT);
}
Also used : SyncManager(de.tum.in.tumcampusapp.utils.sync.SyncManager) CalendarRow(de.tum.in.tumcampusapp.component.tumui.calendar.model.CalendarRow)

Aggregations

CalendarRow (de.tum.in.tumcampusapp.component.tumui.calendar.model.CalendarRow)1 SyncManager (de.tum.in.tumcampusapp.utils.sync.SyncManager)1