From 6ee3bd50b4acda96b61b6b60d3615ed26a19afe0 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Fri, 17 Aug 2012 14:50:05 +0000 Subject: [PATCH] Merged BRANCHES/DEV/CLOUD1_SP to HEAD: 40565: CLOUD-23: core changes to allow overriding of "edit online" button's URL generation. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@40567 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/slingshot-context.xml | 3 +++ .../repo/jscript/app/VtiServerCustomResponse.java | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/config/alfresco/slingshot-context.xml b/config/alfresco/slingshot-context.xml index f5be8b754a..274be16aba 100644 --- a/config/alfresco/slingshot-context.xml +++ b/config/alfresco/slingshot-context.xml @@ -36,6 +36,9 @@ ${vti.server.external.protocol} + + ${vti.server.external.contextPath} + diff --git a/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java b/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java index e4a63d6cf0..79f07aa823 100644 --- a/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java +++ b/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java @@ -42,6 +42,7 @@ public class VtiServerCustomResponse implements CustomResponse private int vtiServerPort = 0; private String vtiServerHost; private String vtiServerProtocol; + private String contextPath; private SysAdminParams sysAdminParams; private ScriptUtils scriptUtils; @@ -94,6 +95,16 @@ public class VtiServerCustomResponse implements CustomResponse { this.vtiServerProtocol = vtiServerProtocol; } + + /** + * Setter for the vtiServer (external) context path. + * + * @param contextPath + */ + public void setContextPath(String contextPath) + { + this.contextPath = contextPath; + } /** * Populates the DocLib webscript response with custom metadata @@ -123,6 +134,10 @@ public class VtiServerCustomResponse implements CustomResponse { jsonObj.put("protocol", this.vtiServerProtocol); } + if (contextPath != null) + { + jsonObj.put("contextPath", contextPath); + } return (Serializable)jsonObj; } catch (Exception e)