1 package org.columba.mail.mailchecking; 17 18 import org.columba.core.command.CommandProcessor; 19 import org.columba.mail.command.POP3CommandReference; 20 import org.columba.mail.config.AccountItem; 21 import org.columba.mail.pop3.POP3Server; 22 import org.columba.mail.pop3.POP3ServerCollection; 23 import org.columba.mail.pop3.command.FetchNewMessagesCommand; 24 25 26 31 public class POP3MailCheckingAction extends AbstractMailCheckingAction { 32 private int accountUid; 33 34 39 public POP3MailCheckingAction(AccountItem accountItem) { 40 super(accountItem); 41 42 accountUid = accountItem.getUid(); 44 } 45 46 49 public void check() { 50 POP3Server controller = POP3ServerCollection.getInstance().uidGet(accountUid); 51 52 setEnabled( false ); 53 54 POP3CommandReference r = new POP3CommandReference(controller); 55 56 FetchNewMessagesCommand c = new FetchNewMessagesCommand(this, r); 57 58 CommandProcessor.getInstance().addOp(c); 59 } 60 63 public boolean isCheckAll() { 64 POP3Server controller = POP3ServerCollection.getInstance().uidGet(accountUid); 65 66 return !controller.getAccountItem().getPopItem() 67 .getBooleanWithDefault("exclude_from_checkall", 68 false); 69 } 70 } 71 | Popular Tags |