01: /*
02: * Created on 24.03.2003
03: *
04: * To change this generated comment go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.columba.mail.folder.command;
08:
09: 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 the
19: * interesting work happens in {@link AbstractMailboxImporter}.
20: * <p>
21: * Note, that the import wizard needs a command to make sure that the folder is
22: * locked.
23: *
24: * @author fdietz
25: */
26: public class ImportMessageCommand extends Command {
27: /**
28: * @param references
29: */
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)
40: throws Exception {
41: ImportFolderCommandReference r = (ImportFolderCommandReference) getReference();
42:
43: AbstractMailboxImporter importer = r.getImporter();
44:
45: importer.run(worker);
46: }
47: }
|