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/HEAD/root@127571 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-06-02 21:40:03 +00:00
parent 00c3315166
commit f17a4d19cf
24 changed files with 382 additions and 236 deletions

View File

@@ -25,6 +25,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;
@@ -33,7 +34,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
{
@@ -41,6 +42,7 @@ public class PublicApiWebScriptServlet extends TenantWebScriptServlet
ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
container = (RuntimeContainer)context.getBean("publicapi.container");
apiAssistant = (ApiAssistant) context.getBean("apiAssistant");
}
/* (non-Javadoc)
@@ -55,7 +57,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;
}
}