From f4f15adf14071b1d9646969866710aa173c9df9e Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Mon, 4 Jul 2011 15:00:07 +0000 Subject: [PATCH] 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 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 --- .../org/alfresco/repository/audit/control.properties | 2 +- .../alfresco/repository/audit/control_de.properties | 2 +- .../alfresco/repository/audit/control_es.properties | 2 +- .../alfresco/repository/audit/control_fr.properties | 2 +- .../alfresco/repository/audit/control_it.properties | 2 +- .../alfresco/repository/audit/control_ja.properties | 2 +- .../org/alfresco/repository/audit/query.get.json.ftl | 2 +- config/alfresco/web-scripts-application-context.xml | 4 +++- .../repo/imap/scripts/ServerStatusWebScript.java | 12 ++++++++---- 9 files changed, 18 insertions(+), 12 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control.properties index b22b46506c..f5e03920ae 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_de.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_de.properties index 13fe2446c0..32fa776c33 100755 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_de.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_de.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_es.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_es.properties index 13fe2446c0..32fa776c33 100755 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_es.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_es.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_fr.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_fr.properties index 13fe2446c0..32fa776c33 100755 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_fr.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_fr.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_it.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_it.properties index 13fe2446c0..32fa776c33 100755 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_it.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_it.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_ja.properties b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_ja.properties index 13fe2446c0..32fa776c33 100755 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_ja.properties +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/control_ja.properties @@ -3,5 +3,5 @@ audit.err.app.notProvided=Application name not supplied. audit.err.app.notFound=Application not found: {0} audit.err.path.notProvided=No path was supplied after the application name. audit.err.action.invalid=Parameter 'action' must be either 'enable' or 'disable' -audit.err.value.classNotFound='valueType' not recognised: {0} +audit.err.value.classNotFound=''valueType'' not recognised: {0} audit.err.value.convertFailed=Unable to convert ''{0}'' to type ''{1}'' \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/query.get.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/query.get.json.ftl index 6c326d7d42..043d7f6d04 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/audit/query.get.json.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/audit/query.get.json.ftl @@ -7,7 +7,7 @@ { "id":${entry.id?c}, "application":"${entry.application}", - "user":"<#if entry.user??>${entry.user}<#else>null", + "user":<#if entry.user??>"${entry.user}"<#else>null, "time":"${xmldate(entry.time)}", "values": <#if entry.values??> diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml index d7bd9d91d1..395211d0b5 100644 --- a/config/alfresco/web-scripts-application-context.xml +++ b/config/alfresco/web-scripts-application-context.xml @@ -802,7 +802,9 @@ - ${imap.server.enabled} + + + diff --git a/source/java/org/alfresco/repo/imap/scripts/ServerStatusWebScript.java b/source/java/org/alfresco/repo/imap/scripts/ServerStatusWebScript.java index f9d95afe46..323a25cbb4 100644 --- a/source/java/org/alfresco/repo/imap/scripts/ServerStatusWebScript.java +++ b/source/java/org/alfresco/repo/imap/scripts/ServerStatusWebScript.java @@ -20,17 +20,21 @@ package org.alfresco.repo.imap.scripts; import java.io.IOException; +import org.alfresco.repo.imap.ImapService; import org.springframework.extensions.webscripts.AbstractWebScript; import org.springframework.extensions.webscripts.WebScriptRequest; import org.springframework.extensions.webscripts.WebScriptResponse; +/** + * Shows the availability of the IMAP server via web script request. + */ public class ServerStatusWebScript extends AbstractWebScript { - private boolean imapServerEnabled; + private ImapService imapService; public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException { - if (imapServerEnabled) + if (imapService.getImapServerEnabled()) { res.getWriter().write("enabled"); } @@ -42,9 +46,9 @@ public class ServerStatusWebScript extends AbstractWebScript res.getWriter().close(); } - public void setImapServerEnabled(boolean imapServerEnabled) + public void setImapService(ImapService imapService) { - this.imapServerEnabled = imapServerEnabled; + this.imapService = imapService; } }