1 /*2 * Created on 24.03.20033 *4 * To change this generated comment go to5 * Window>Preferences>Java>Code Generation>Code and Comments6 */7 package org.columba.mail.folder.command;8 9 import org.columba.api.command.ICommandReference;10 import org.columba.api.command.IWorkerStatusController;11 import org.columba.core.command.Command;12 import org.columba.mail.command.ImportFolderCommandReference;13 import org.columba.mail.folder.mailboximport.AbstractMailboxImporter;14 15 /**16 * Import messages to folder.17 * <p>18 * This command is used by the mail import wizard to import messages. All the19 * interesting work happens in {@link AbstractMailboxImporter}.20 * <p>21 * Note, that the import wizard needs a command to make sure that the folder is22 * locked.23 * 24 * @author fdietz25 */26 public class ImportMessageCommand extends Command {27 /**28 * @param references29 */30 public ImportMessageCommand(ICommandReference reference) {31 super(reference);32 }33 34 /*35 * (non-Javadoc)36 * 37 * @see org.columba.api.command.Command#execute(org.columba.api.command.Worker)38 */39 public void execute(IWorkerStatusController worker) throws Exception {40 ImportFolderCommandReference r = (ImportFolderCommandReference) getReference();41 42 AbstractMailboxImporter importer = r.getImporter();43 44 importer.run(worker);45 }46 }