mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user