REPO-164 / REPO-1086 - V1 REST API: Lock Node

- review suggestions
   - added more test cases + utility methods

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129751 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-08-22 13:10:19 +00:00
parent 4bd81d77fc
commit 8679372a42

View File

@@ -465,16 +465,7 @@ public class LockServiceImpl implements LockService,
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, boolean lockChildren)
throws UnableToAquireLockException
{
lock(nodeRef, lockType, timeToExpire);
if (lockChildren == true)
{
Collection<ChildAssociationRef> childAssocRefs = this.nodeService.getChildAssocs(nodeRef);
for (ChildAssociationRef childAssocRef : childAssocRefs)
{
lock(childAssocRef.getChildRef(), lockType, timeToExpire, lockChildren);
}
}
lock(nodeRef, lockType, timeToExpire, lockChildren);
}
/**