Merge IMAP in

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14947 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-06-26 08:48:25 +00:00
parent 3421f84fdc
commit 5500f162b4
58 changed files with 7451 additions and 5171 deletions

View File

@@ -46,15 +46,13 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
private ImapServer serverImpl;
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,6 +63,11 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
this.port = port;
}
public void setHost(String host)
{
this.host = host;
}
public void setImapHostManager(ImapHostManager imapHostManager)
{
this.imapHostManager = imapHostManager;
@@ -75,14 +78,9 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
this.imapUserManager = imapUserManager;
}
public void setImapHelper(ImapHelper imapHelper)
{
this.imapHelper = imapHelper;
}
protected void onBootstrap(ApplicationEvent event)
{
if (imapServerEnabled && imapHelper.isPatchApplied())
if (imapServerEnabled)
{
Managers imapManagers = new Managers()
{
@@ -96,11 +94,11 @@ public class AlfrescoImapServer extends AbstractLifecycleBean
return imapUserManager;
}
};
serverImpl = new ImapServer(new ServerSetup(port, null, ServerSetup.PROTOCOL_IMAP), imapManagers);
serverImpl = new ImapServer(new ServerSetup(port, host, ServerSetup.PROTOCOL_IMAP), imapManagers);
serverImpl.startService(null);
if (logger.isInfoEnabled())
{
logger.info("IMAP service started on port " + this.port + ".");
logger.info("IMAP service started on host:port " + this.host + ":" + this.port + ".");
}
}
else