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

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129643 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-08-18 12:11:24 +00:00
parent 54ace720da
commit d471969302
3 changed files with 61 additions and 2 deletions

View File

@@ -317,6 +317,25 @@ public class LockServiceImpl implements LockService,
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, Lifetime lifetime)
{
lock(nodeRef, lockType, timeToExpire, lifetime, null);
}
/**
* @see org.alfresco.service.cmr.lock.LockService#lock(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.lock.LockType, int, Lifetime, boolean)
*/
@Override
@Extend(traitAPI=LockServiceTrait.class,extensionAPI=LockServiceExtension.class)
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, Lifetime lifetime, boolean lockChildren)
{
lock(nodeRef, lockType, timeToExpire, lifetime);
if (lockChildren)
{
Collection<ChildAssociationRef> childAssocRefs = this.nodeService.getChildAssocs(nodeRef);
for (ChildAssociationRef childAssocRef : childAssocRefs)
{
lock(childAssocRef.getChildRef(), lockType, timeToExpire, lifetime, lockChildren);
}
}
}
/**