From e9474e4764767ca7beae583c194bd26d64c15cf8 Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Tue, 23 Mar 2010 12:03:15 +0000 Subject: [PATCH] Merged DEV/BELARUS/HEAD-2010_03_17 to HEAD 19398: SAIL-298: Create New subsystems and modify identified modules to use properties from newly created subsystems - Remove web.application.context.url from repository.properties and action-services-context.xml. - Expose mailService outside of the OutboundSMTP subsystem because it is needed for email space/invited users actions. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19497 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/action-services-context.xml | 16 +++++++++++-- config/alfresco/repository.properties | 2 -- .../action/executer/ScriptActionExecuter.java | 23 +++++++++---------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/config/alfresco/action-services-context.xml b/config/alfresco/action-services-context.xml index fd5f2daeda..37149c8cdc 100644 --- a/config/alfresco/action-services-context.xml +++ b/config/alfresco/action-services-context.xml @@ -426,6 +426,18 @@ + + + + + + + + org.springframework.mail.javamail.JavaMailSender + + + + false @@ -517,8 +529,8 @@ /${spaces.company_home.childname} - - ${web.application.context.url} + + diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties index 3a25f24dd6..0dac9069d4 100644 --- a/config/alfresco/repository.properties +++ b/config/alfresco/repository.properties @@ -6,8 +6,6 @@ repository.name=Main Repository dir.root=./alf_data -web.application.context.url=http://localhost:8080/alfresco - dir.contentstore=${dir.root}/contentstore dir.contentstore.deleted=${dir.root}/contentstore.deleted diff --git a/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java b/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java index d58033fa28..ca6bb2701b 100644 --- a/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java +++ b/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java @@ -24,6 +24,7 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.repo.action.ParameterDefinitionImpl; +import org.alfresco.repo.admin.SysAdminParams; import org.alfresco.repo.jscript.ScriptAction; import org.alfresco.service.ServiceRegistry; import org.alfresco.service.cmr.action.Action; @@ -48,11 +49,11 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase public static final String PARAM_SCRIPTREF = "script-ref"; private ServiceRegistry serviceRegistry; + private SysAdminParams sysAdminParams; private PersonService personService; private String companyHomePath; private StoreRef storeRef; private ScriptLocation scriptLocation; - private String webApplicationContextUrl; /** * @param serviceRegistry The serviceRegistry to set. @@ -62,6 +63,14 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase this.serviceRegistry = serviceRegistry; } + /** + * @param sysAdminParams The sysAdminParams to set. + */ + public void setSysAdminParams(SysAdminParams sysAdminParams) + { + this.sysAdminParams = sysAdminParams; + } + /** * @param personService The personService to set. */ @@ -90,16 +99,6 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase this.scriptLocation = scriptLocation; } - /** - * Set the web application context url - * - * @param webApplicationContextUrl web application context url - */ - public void setWebApplicationContextUrl(String webApplicationContextUrl) - { - this.webApplicationContextUrl = webApplicationContextUrl; - } - /** * Allow adhoc properties to be passed to this action * @@ -155,7 +154,7 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase ScriptAction scriptAction = new ScriptAction(this.serviceRegistry, action, this.actionDefinition); model.put("action", scriptAction); - model.put("webApplicationContextUrl", webApplicationContextUrl); + model.put("webApplicationContextUrl", sysAdminParams.getAlfrescoProtocol() + "://" + sysAdminParams.getAlfrescoHost() + ":" + sysAdminParams.getAlfrescoPort() + "/" + sysAdminParams.getAlfrescoContext()); Object result = null; if (this.scriptLocation == null)