Merged V3.4-BUG-FIX to HEAD

28741: Merged DEV/TEMPORARY to V3.4-BUG-FIX
      28740: ALF-8993: IMAP favourite star is not visible if imap is enabled via JMX
         The org.alfresco.repo.imap.ImapService interface was extended to expose getEnabled() and made the webscript to call ImapService.getEnabled().
   28742: ALF-8801: Broken French strings
   28745: ALF-6470: French string correction
   28746: ALF-5607: Installer deletion of directories on installation cancel.
   28756: ALF-9211: Install fails when path selected that contains accents or double byte chars (e.g. Japanese)
   - Fix from Bitrock
   - Not internationalized yet
   28758: Merged DEV to V3.4-BUG-FIX
      28743: ALF-8029: JSON returned by some audit queries not valide
             Quote user in query.get.json.ftl if it has value.
   28761: Merged DEV to V3.4-BUG-FIX
      28739: ALF-9123 : "Content URL conversion failed" error being thrown
      Note: Actually changed the implementation but the principle remains.
      In future, use a thread-safe boolean e.g. AtomicBoolean to carry data
      around about the running state; don't use a class member variable as
      it can be manipulated by competing threads, etc.
   28762: Fix ALF-9376: Typo in Version2Model
   28763: Merged DEV to V3.4-BUG-FIX
      28754: ALF-8461: Invalid property cm:source (cm:copiedFrom) causes not be become sys:incomplete
             Configurable property called 'propertiesToIgnore' was added to IncompleteNodeTagger,and configured to ignore "cm:source".
      Merge note: I fixed the stored 'propertiesToIgnore' to be a Set<QName> to prevent unnecessary conversions
   28764: ALF-9036: Fix NPE on XForm session timeout
   28765: ALF-9211: Externalized new installer message
   - Needs localizing
   28789: ALF-9407: Single quote characters in messages containing {} need to be doubled


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28793 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-07-04 15:00:07 +00:00
parent 212e229c73
commit 629bfa0735
29 changed files with 145 additions and 129 deletions

View File

@@ -279,5 +279,11 @@ public interface ImapService
NodeRef messageFile,
MimeMessage originalMessage)
throws IOException, MessagingException;
/**
* Determines whether the IMAP server is enabled.
*
* @return true if enabled
*/
public boolean getImapServerEnabled();
}

View File

@@ -147,6 +147,8 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
private final static Map<QName, Flags.Flag> qNameToFlag;
private final static Map<Flags.Flag, QName> flagToQname;
private boolean imapServerEnabled = false;
static
{
qNameToFlag = new HashMap<QName, Flags.Flag>();
@@ -175,22 +177,16 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
public static class ImapServiceBootstrap extends AbstractLifecycleBean
{
private ImapServiceImpl service;
private boolean imapServerEnabled;
public void setService(ImapServiceImpl service)
{
this.service = service;
}
public void setImapServerEnabled(boolean imapServerEnabled)
{
this.imapServerEnabled = imapServerEnabled;
}
@Override
protected void onBootstrap(ApplicationEvent event)
{
if (imapServerEnabled)
if (service.getImapServerEnabled())
{
service.startup();
}
@@ -199,7 +195,7 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
@Override
protected void onShutdown(ApplicationEvent event)
{
if (imapServerEnabled)
if (service.getImapServerEnabled())
{
service.shutdown();
}
@@ -305,6 +301,16 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
this.extractAttachmentsEnabled = extractAttachmentsEnabled;
}
public void setImapServerEnabled(boolean enabled)
{
this.imapServerEnabled = enabled;
}
public boolean getImapServerEnabled()
{
return this.imapServerEnabled;
}
// ---------------------- Lifecycle Methods ------------------------------
public void init()