Merged 5.2.N (5.2.1) to HEAD (5.2)

129716 amorarasu: REPO-340 / REPO-1136 - V1 REST API: Unlock Node


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130220 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 14:41:44 +00:00
parent 2953ce53de
commit bd54639d22
7 changed files with 275 additions and 24 deletions

View File

@@ -787,6 +787,18 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
}
return ResourceUtils.getFile(url);
}
protected Document lock(String nodeId, String body) throws Exception
{
HttpResponse response = post("nodes/" + nodeId + "/lock", body, null, 200);
return RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
}
protected Document unlock(String nodeId, String body) throws Exception
{
HttpResponse response = post("nodes/" + nodeId + "/unlock", body, null, 200);
return RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
}
protected static final long PAUSE_TIME = 5000; //millisecond
protected static final int MAX_RETRY = 20;