mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
127571 jkaabimofrad: Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2) 126242 gjames: RA-878:All api errors should return the standard error object git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127665 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.repo.web.scripts.TenantWebScriptServlet;
|
||||
import org.alfresco.rest.framework.tools.ApiAssistant;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.extensions.webscripts.RuntimeContainer;
|
||||
import org.springframework.extensions.webscripts.servlet.WebScriptServletRuntime;
|
||||
@@ -40,7 +41,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
public class PublicApiWebScriptServlet extends TenantWebScriptServlet
|
||||
{
|
||||
private static final long serialVersionUID = 726730674397482039L;
|
||||
|
||||
private ApiAssistant apiAssistant;
|
||||
@Override
|
||||
public void init() throws ServletException
|
||||
{
|
||||
@@ -48,6 +49,7 @@ public class PublicApiWebScriptServlet extends TenantWebScriptServlet
|
||||
|
||||
ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
|
||||
container = (RuntimeContainer)context.getBean("publicapi.container");
|
||||
apiAssistant = (ApiAssistant) context.getBean("apiAssistant");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -62,7 +64,7 @@ public class PublicApiWebScriptServlet extends TenantWebScriptServlet
|
||||
|
||||
protected WebScriptServletRuntime getRuntime(HttpServletRequest req, HttpServletResponse res)
|
||||
{
|
||||
WebScriptServletRuntime runtime = new PublicApiTenantWebScriptServletRuntime(container, authenticatorFactory, req, res, serverProperties);
|
||||
WebScriptServletRuntime runtime = new PublicApiTenantWebScriptServletRuntime(container, authenticatorFactory, req, res, serverProperties, apiAssistant);
|
||||
return runtime;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user