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:
Alan Davis
2016-06-03 14:14:04 +00:00
parent 4521ecaed9
commit b2fe847b6c
24 changed files with 364 additions and 236 deletions

View File

@@ -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;
}
}