mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV/IMAP3 to HEAD
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14654 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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,6 +65,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 +80,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 +96,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
|
||||
|
Reference in New Issue
Block a user