mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
WebScript Runtime response/url model extended to support output of client-side webscript url generation function.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5902 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,15 +33,18 @@ package org.alfresco.web.scripts;
|
||||
public class URLModel
|
||||
{
|
||||
private WebScriptRequest req;
|
||||
private WebScriptResponse res;
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param req
|
||||
* @param res
|
||||
*/
|
||||
URLModel(WebScriptRequest req)
|
||||
URLModel(WebScriptRequest req, WebScriptResponse res)
|
||||
{
|
||||
this.req = req;
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,5 +156,16 @@ public class URLModel
|
||||
{
|
||||
return getExtension();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the client url encoding function script
|
||||
*
|
||||
* @param name name of the function object to return
|
||||
*
|
||||
* @return script to encode urls on the client
|
||||
*/
|
||||
public String getClientUrlFunction(String name)
|
||||
{
|
||||
return res.getEncodeScriptUrlFunction(name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user