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; } }