1 package org.columba.calendar.command; 19 20 import java.io.File ; 21 22 import org.columba.api.command.IWorkerStatusController; 23 import org.columba.calendar.base.api.ICalendarItem; 24 import org.columba.calendar.parser.CalendarExporter; 25 import org.columba.calendar.store.api.ICalendarStore; 26 import org.columba.core.command.Command; 27 28 public class ExportCalendarCommand extends Command { 29 30 private File destFile; 31 32 public ExportCalendarCommand(CalendarCommandReference ref, File destFile) { 33 super(ref); 34 35 this.destFile = destFile; 36 } 37 38 @Override  39 public void execute(IWorkerStatusController worker) throws Exception { 40 ICalendarStore store = ((CalendarCommandReference) getReference()) 41 .getStore(); 42 ICalendarItem calendar = ((CalendarCommandReference) getReference()) 43 .getSrcCalendar(); 44 45 new CalendarExporter() 46 .exportCalendar(destFile, calendar.getId(), store); 47 48 } 49 } 50 | Popular Tags |