Reverse-merged /alfresco/BRANCHES/DEV/IMAP3:r14500,14521,14560,14563,14632

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14657 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-06-11 14:00:22 +00:00
parent 1a0c0dc758
commit cb7c4e6593
51 changed files with 2797 additions and 4727 deletions

View File

@@ -47,14 +47,14 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
private int port = 143;
private String host = "localhost";
private ImapHostManager imapHostManager;
private UserManager imapUserManager;
private boolean imapServerEnabled;
private ImapHelper imapHelper;
public void setImapServerEnabled(boolean imapServerEnabled)
{
this.imapServerEnabled = imapServerEnabled;
@@ -65,11 +65,6 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
this.port = port;
}
public void setHost(String host)
{
this.host = host;
}
public void setImapHostManager(ImapHostManager imapHostManager)
{
this.imapHostManager = imapHostManager;
@@ -80,9 +75,14 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
this.imapUserManager = imapUserManager;
}
public void setImapHelper(ImapHelper imapHelper)
{
this.imapHelper = imapHelper;
}
protected void onBootstrap(ApplicationEvent event)
{
if (imapServerEnabled)
if (imapServerEnabled && imapHelper.isPatchApplied())
{
Managers imapManagers = new Managers()
{
@@ -96,11 +96,11 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
return imapUserManager;
}
};
serverImpl = new ImapServer(new ServerSetup(port, host, ServerSetup.PROTOCOL_IMAP), imapManagers);
serverImpl = new ImapServer(new ServerSetup(port, null, ServerSetup.PROTOCOL_IMAP), imapManagers);
serverImpl.startService(null);
if (logger.isInfoEnabled())
{
logger.info("IMAP service started on host:port " + this.host + ":" + this.port + ".");
logger.info("IMAP service started on port " + this.port + ".");
}
}
else