1 | public class CopyMessageAction extends AbstractFilterAction {↵ | | 1 | public class MoveMessageAction extends AbstractFilterAction {↵
|
2 | ↵ | | 2 | /**↵
|
| | | 3 | * @see org.columba.modules.mail.filter.action.AbstractFilterAction#execute()↵
|
| | | 4 | *↵
|
| | | 5 | * move message from source- to destination-folder↵
|
| | | 6 | */↵
|
3 | public ICommand getCommand(IFilterAction filterAction,↵ | | 7 | public ICommand getCommand(IFilterAction filterAction,↵
|
4 | IFolder srcFolder, Object[] uids) throws Exception {↵ | | 8 | IFolder srcFolder, Object[] uids) throws Exception {↵
|
5 | String uid = filterAction.getUid();↵ | | 9 | String uid = filterAction.getUid();↵
|
|
6 | IMailbox destFolder = (IMailbox) FolderTreeModel.getInstance()↵ | | 10 | IMailbox destFolder = (IMailbox) FolderTreeModel.getInstance()↵
|
7 | .getFolder(uid);↵ | | 11 | .getFolder(uid);↵
|
|
8 | if (destFolder == null) {↵ | | 12 | if (destFolder == null) {↵
|
9 | JOptionPane↵ | | 13 | JOptionPane↵
|
10 | .showMessageDialog(↵ | | 14 | .showMessageDialog(↵
|
11 | FrameManager.getInstance()↵ | | 15 | FrameManager.getInstance()↵
|
12 | .getActiveFrame(),↵ | | 16 | .getActiveFrame(),↵
|
13 | "Unable to find destination folder, please correct the destination folder path for this filter");↵ | | 17 | "Unable to find destination folder, please correct the destination folder path for this filter");↵
|
14 | throw new Exception("File not found");↵ | | 18 | throw new Exception("File not found");↵
|
15 | }↵ | | 19 | }↵
|
|
16 | MailFolderCommandReference r = new MailFolderCommandReference(srcFolder,↵ | | 20 | MailFolderCommandReference r = new MailFolderCommandReference(srcFolder,↵
|
17 | destFolder, uids);↵ | | 21 | destFolder, uids);↵
|
|
18 | CopyMessageCommand c = new CopyMessageCommand(r);↵ | | 22 | MoveMessageCommand c = new MoveMessageCommand(r);↵
|
|
19 | return c;↵ | | 23 | return c;↵
|
20 | | | 24 |
|