ALF-20216 "4.2 Preview: valid API URL returns an error"

ALF-20217 "4.2 Preview: Some errors are formatted with Explorer UI look and feel"
Note that the discoverablity urls will not work (this is not a regression from Cloud) - see ALF-20218
ALF-20098 "BM-0012: Run v420b1494_01: Exception from executeScript"
Two problems were identified with the public api webscript processing:
i) No buffering of requests and responses due to a fix for another bug (this is required due to retrying transactions)
ii) Exceptions are handled by the public api framework and JSON responses written out. In some cases, exceptions were slipping through and being handled by the Spring web script framework (which was writing them out as non JSON responses).

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@56385 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2013-10-08 13:47:27 +00:00
parent a402cc75ed
commit 149d6794bb
10 changed files with 834 additions and 674 deletions

View File

@@ -18,7 +18,6 @@
*/
package org.alfresco.rest.api;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -62,13 +61,19 @@ public class PublicApiDeclarativeRegistry extends DeclarativeRegistry
{
if(method.equalsIgnoreCase("get") && uri.equals(PublicApiTenantWebScriptServletRequest.NETWORKS_PATH))
{
Map<String, String> templateVars = Collections.emptyMap();
Map<String, String> templateVars = new HashMap<String, String>();
templateVars.put("apiScope", "public");
templateVars.put("apiVersion", "1");
templateVars.put("apiName", "networks");
Match match = new Match("", templateVars, "", getNetworksWebScript);
return match;
}
else if(method.equalsIgnoreCase("get") && uri.equals(PublicApiTenantWebScriptServletRequest.NETWORK_PATH))
{
Map<String, String> templateVars = new HashMap<String, String>();
Map<String, String> templateVars = new HashMap<String, String>();
templateVars.put("apiScope", "public");
templateVars.put("apiVersion", "1");
templateVars.put("apiName", "network");
Match match = new Match("", templateVars, "", getNetworkWebScript);
return match;
}