com.atlassian.confluence.mail.archive
Class DefaultMailAccountManager

java.lang.Object
  extended by com.atlassian.confluence.mail.archive.DefaultMailAccountManager
All Implemented Interfaces:
MailAccountManager

public class DefaultMailAccountManager
extends Object
implements MailAccountManager


Constructor Summary
DefaultMailAccountManager(ClusterManager clusterManager, com.atlassian.bandana.BandanaManager bandanaManager, MailContentManager mailContentManager, SpaceManager spaceManager)
           
 
Method Summary
 MailAccount addMailAccount(Space space, MailAccount mailAccount)
           
 MailAccount getMailAccount(Space space, int accountId)
           
 List<MailAccount> getMailAccounts(Space space)
           
 List<MailPollResult> poll(Space space)
           
 MailPollResult poll(Space space, MailAccount mailAccount)
          Cause the account to retrieve all pending new mail and store it.
 List<MailPollResult> pollAllSpaces()
           
 void removeMailAccount(Space space, int accountId)
           
 void updateAccount(Space space, MailAccount mailAccount)
           
 MailPollResult updateAccountStatus(MailAccount mailAccount)
          check whether mail account can reliably retrieve mail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMailAccountManager

public DefaultMailAccountManager(ClusterManager clusterManager,
                                 com.atlassian.bandana.BandanaManager bandanaManager,
                                 MailContentManager mailContentManager,
                                 SpaceManager spaceManager)
Method Detail

updateAccountStatus

public MailPollResult updateAccountStatus(MailAccount mailAccount)
Description copied from interface: MailAccountManager
check whether mail account can reliably retrieve mail. This will perform a check (by connecting to the server and logging in, for example) rather than just trusting the last known status value set on the mail account.

Specified by:
updateAccountStatus in interface MailAccountManager
Returns:
true if the server successfully verified its status, false otherwise

poll

public List<MailPollResult> poll(Space space)
Specified by:
poll in interface MailAccountManager

poll

public MailPollResult poll(Space space,
                           MailAccount mailAccount)
Cause the account to retrieve all pending new mail and store it. Accounts that delete mail after it is retrieved will delete mail after this step.

Specified by:
poll in interface MailAccountManager
Returns:
a result object describing whether the poll was successful, and if so how much mail was retrieved.

getMailAccounts

public List<MailAccount> getMailAccounts(Space space)
Specified by:
getMailAccounts in interface MailAccountManager

addMailAccount

public MailAccount addMailAccount(Space space,
                                  MailAccount mailAccount)
Specified by:
addMailAccount in interface MailAccountManager

removeMailAccount

public void removeMailAccount(Space space,
                              int accountId)
Specified by:
removeMailAccount in interface MailAccountManager

getMailAccount

public MailAccount getMailAccount(Space space,
                                  int accountId)
Specified by:
getMailAccount in interface MailAccountManager

updateAccount

public void updateAccount(Space space,
                          MailAccount mailAccount)
Specified by:
updateAccount in interface MailAccountManager

pollAllSpaces

public List<MailPollResult> pollAllSpaces()
Specified by:
pollAllSpaces in interface MailAccountManager


Copyright © 2003-2012 Atlassian. All Rights Reserved.