mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-1187 / REPO-164: V1 REST API to "lock content node" - initially, we will support one of two lock types, either ALLOW_OWNER_CHANGES (default, if not requested otherwise) or FULL
- we will not support ALLOW_ADD_CHILDREN lock type (removed as part of this change request) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130046 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -49,8 +49,8 @@ public class LockInfo
|
|||||||
public static enum LockType2
|
public static enum LockType2
|
||||||
{
|
{
|
||||||
FULL(LockType.READ_ONLY_LOCK),
|
FULL(LockType.READ_ONLY_LOCK),
|
||||||
ALLOW_ADD_CHILDREN(LockType.NODE_LOCK),
|
|
||||||
ALLOW_OWNER_CHANGES(LockType.WRITE_LOCK);
|
ALLOW_OWNER_CHANGES(LockType.WRITE_LOCK);
|
||||||
|
// ALLOW_ADD_CHILDREN(LockType.NODE_LOCK); // removed for now, as per REPO-1187
|
||||||
|
|
||||||
private LockType type;
|
private LockType type;
|
||||||
|
|
||||||
@@ -58,6 +58,7 @@ public class LockInfo
|
|||||||
{
|
{
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LockType getType()
|
public LockType getType()
|
||||||
{
|
{
|
||||||
return type;
|
return type;
|
||||||
|
@@ -3729,6 +3729,10 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
|
|||||||
body.put("type", "FULL123");
|
body.put("type", "FULL123");
|
||||||
post(getNodeOperationUrl(dC1Id, "lock"), toJsonAsStringNonNull(body), null, 400);
|
post(getNodeOperationUrl(dC1Id, "lock"), toJsonAsStringNonNull(body), null, 400);
|
||||||
|
|
||||||
|
body = new HashMap<>();
|
||||||
|
body.put("type", "ALLOW_ADD_CHILDREN");
|
||||||
|
post(getNodeOperationUrl(dC1Id, "lock"), toJsonAsStringNonNull(body), null, 400);
|
||||||
|
|
||||||
body = new HashMap<>();
|
body = new HashMap<>();
|
||||||
body.put("lifetime", "PERSISTENT123");
|
body.put("lifetime", "PERSISTENT123");
|
||||||
post(getNodeOperationUrl(dC1Id, "lock"), toJsonAsStringNonNull(body), null, 400);
|
post(getNodeOperationUrl(dC1Id, "lock"), toJsonAsStringNonNull(body), null, 400);
|
||||||
|
Reference in New Issue
Block a user