Web Scripts as JSR-168 portlets

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-05-04 15:11:19 +00:00
parent 1618ac1a83
commit fa8309b777
31 changed files with 1981 additions and 885 deletions

View File

@@ -88,6 +88,7 @@ public class TestWebScriptServer
this.registry = registry;
}
/**
* Sets the Messages resource bundle
*
@@ -162,15 +163,9 @@ public class TestWebScriptServer
MockHttpServletRequest req = createRequest("get", uri);
MockHttpServletResponse res = new MockHttpServletResponse();
WebScriptMatch match = registry.findWebScript(req.getMethod(), uri);
if (match == null)
{
throw new WebScriptException("No service bound to uri '" + uri + "'");
}
WebScriptRequest apiReq = new WebScriptRequest(req, match);
WebScriptResponse apiRes = new WebScriptResponse(res);
match.getWebScript().execute(apiReq, apiRes);
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, null, req, res);
runtime.executeScript();
return res;
}
@@ -346,5 +341,5 @@ public class TestWebScriptServer
return req;
}
}