1 | public class SubscribeFolderCommand extends Command {↵ | | 1 | public class UnsubscribeFolderCommand extends Command {↵
|
2 | private IMAPRootFolder root;↵ | | 2 | private IMAPRootFolder root;↵
|
|
3 | private IImapServer store;↵ | | 3 | private IImapServer store;↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * @param references↵ | | 5 | * @param references↵
|
6 | */↵ | | 6 | */↵
|
7 | public SubscribeFolderCommand(SubscribeCommandReference reference) {↵ | | 7 | public UnsubscribeFolderCommand(SubscribeCommandReference reference) {↵
|
8 | super(reference);↵ | | 8 | super(reference);↵
|
9 | }↵ | | 9 | }↵
|
|
10 | /*↵ | | 10 | /*↵
|
11 | * (non-Javadoc)↵ | | 11 | * (non-Javadoc)↵
|
12 | * ↵ | | 12 | * ↵
|
13 | * @see org.columba.api.command.Command#execute(org.columba.api.command.Worker)↵ | | 13 | * @see org.columba.api.command.Command#execute(org.columba.api.command.Worker)↵
|
14 | */↵ | | 14 | */↵
|
15 | public void execute(IWorkerStatusController worker) throws Exception {↵ | | 15 | public void execute(IWorkerStatusController worker) throws Exception {↵
|
16 | SubscribeCommandReference subscribeReference = (SubscribeCommandReference) getReference();↵ | | 16 | SubscribeCommandReference subscribeReference = (SubscribeCommandReference) getReference();↵
|
17 | root = (IMAPRootFolder) subscribeReference.getSourceFolder();↵ | | 17 | root = (IMAPRootFolder) subscribeReference.getSourceFolder();↵
|
|
18 | store = root.getServer();↵ | | 18 | store = root.getServer();↵
|
|
19 | store.subscribeFolder(subscribeReference.getMailbox());↵ | | 19 | store.unsubscribeFolder(subscribeReference.getMailbox());↵
|
20 | }↵ | | 20 | }↵
|
|
21 | /*↵ | | 21 | /*↵
|
22 | * (non-Javadoc)↵ | | 22 | * (non-Javadoc)↵
|
23 | * ↵ | | 23 | * ↵
|
24 | * @see org.columba.api.command.Command#updateGUI()↵ | | 24 | * @see org.columba.api.command.Command#updateGUI()↵
|
25 | */↵ | | 25 | */↵
|
26 | public void updateGUI() throws Exception {↵ | | 26 | public void updateGUI() throws Exception {↵
|
27 | SubscribeDialog dialog = ((SubscribeCommandReference) getReference())↵ | | 27 | SubscribeDialog dialog = ((SubscribeCommandReference) getReference())↵
|
28 | .getDialog();↵ | | 28 | .getDialog();↵
|
|
29 | dialog.subscribeDone() | | 29 | dialog.unsubscribeDone()
|