- Web Script Runtime now takes ServiceRegistry in constructor (not an explicit ever growing list of services)

- default status templates now include Alfresco server information & time of error for diagnostic purposes
- template url.match does not include service context anymore e.g. /alfresco/service/api/path/ is now just /api/path/
- added Retrying Transaction Helper to Service Registry

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6088 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-06-25 12:38:32 +00:00
parent 7bde225592
commit 4ede480475
14 changed files with 51 additions and 43 deletions

View File

@@ -44,6 +44,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.web.config.ServerConfigElement;
@@ -64,10 +65,10 @@ public class TestWebScriptServer
{
// dependencies
protected AuthenticationService authenticationService;
protected RetryingTransactionHelper retryingTransactionHelper;
protected AuthorityService authorityService;
protected DeclarativeWebScriptRegistry registry;
protected ConfigService configService;
protected ServiceRegistry serviceRegistry;
protected RetryingTransactionHelper retryingTransactionHelper;
/** Server Configuration */
private ServerConfigElement serverConfig;
@@ -106,6 +107,16 @@ public class TestWebScriptServer
this.registry = registry;
}
/**
* Sets the Service Registry
*
* @param registry
*/
public void setServiceRegistry(ServiceRegistry serviceRegistry)
{
this.serviceRegistry = serviceRegistry;
}
/**
* Sets the Config Service
*
@@ -124,14 +135,6 @@ public class TestWebScriptServer
this.authenticationService = authenticationService;
}
/**
* @param authorityService
*/
public void setAuthorityService(AuthorityService authorityService)
{
this.authorityService = authorityService;
}
/**
* Sets the Messages resource bundle
*
@@ -213,7 +216,7 @@ public class TestWebScriptServer
MockHttpServletRequest req = createRequest(method, uri);
MockHttpServletResponse res = new MockHttpServletResponse();
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, retryingTransactionHelper, authorityService, null, req, res, serverConfig);
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, serviceRegistry, null, req, res, serverConfig);
runtime.executeScript();
return res;
@@ -238,7 +241,7 @@ public class TestWebScriptServer
}
MockHttpServletResponse res = new MockHttpServletResponse();
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, retryingTransactionHelper, authorityService, null, req, res, serverConfig);
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, serviceRegistry, null, req, res, serverConfig);
runtime.executeScript();
return res;