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
This commit is contained in:
Matt Ward
2012-08-17 14:50:05 +00:00
parent ed0425319f
commit 6ee3bd50b4
2 changed files with 18 additions and 0 deletions

View File

@@ -36,6 +36,9 @@
<property name="protocol"> <property name="protocol">
<value>${vti.server.external.protocol}</value> <value>${vti.server.external.protocol}</value>
</property> </property>
<property name="contextPath">
<value>${vti.server.external.contextPath}</value>
</property>
</bean> </bean>
<bean id="doclibCustomGoogleDocs" class="org.alfresco.repo.jscript.app.GoogleDocsCustomResponse"/> <bean id="doclibCustomGoogleDocs" class="org.alfresco.repo.jscript.app.GoogleDocsCustomResponse"/>

View File

@@ -42,6 +42,7 @@ public class VtiServerCustomResponse implements CustomResponse
private int vtiServerPort = 0; private int vtiServerPort = 0;
private String vtiServerHost; private String vtiServerHost;
private String vtiServerProtocol; private String vtiServerProtocol;
private String contextPath;
private SysAdminParams sysAdminParams; private SysAdminParams sysAdminParams;
private ScriptUtils scriptUtils; private ScriptUtils scriptUtils;
@@ -95,6 +96,16 @@ public class VtiServerCustomResponse implements CustomResponse
this.vtiServerProtocol = vtiServerProtocol; 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 * Populates the DocLib webscript response with custom metadata
* *
@@ -123,6 +134,10 @@ public class VtiServerCustomResponse implements CustomResponse
{ {
jsonObj.put("protocol", this.vtiServerProtocol); jsonObj.put("protocol", this.vtiServerProtocol);
} }
if (contextPath != null)
{
jsonObj.put("contextPath", contextPath);
}
return (Serializable)jsonObj; return (Serializable)jsonObj;
} }
catch (Exception e) catch (Exception e)