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

129999 ahind: Merged 5.2.N-AHIND (5.2.1) to searchapi (5.2.1)
      129643 amorarasu: 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@130261 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-06 14:58:13 +00:00
parent 0029357fa1
commit 91cc53e31b
4 changed files with 86 additions and 85 deletions

View File

@@ -1333,7 +1333,7 @@ public class NodesImpl implements Nodes
Set<QName> assocTypeQNames = buildAssocTypes(assocTypeQNameParam);
// call GetChildrenCannedQuery (via FileFolderService)
if (((filterProps == null) || (filterProps.size() == 0)) &&
if (((filterProps == null) || (filterProps.size() == 0)) &&
((assocTypeQNames == null) || (assocTypeQNames.size() == 0)) &&
(smartStore.isVirtual(parentNodeRef)|| (smartStore.canVirtualize(parentNodeRef))))
{
@@ -1996,11 +1996,11 @@ public class NodesImpl implements Nodes
return false;
}
private boolean isLocked(NodeRef nodeRef, Set<QName> aspects)
{
boolean locked = false;
if (((aspects != null) && aspects.contains(ContentModel.ASPECT_LOCKABLE))
if (((aspects != null) && aspects.contains(ContentModel.ASPECT_LOCKABLE))
|| nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE))
{
locked = lockService.isLocked(nodeRef);
@@ -2970,10 +2970,10 @@ public class NodesImpl implements Nodes
lockInfo = validateLockInformation(lockInfo);
lockService.lock(nodeRef, lockInfo.getMappedType(), lockInfo.getTimeToExpire(), lockInfo.getLifetime());
return getFolderOrDocument(nodeId, parameters);
}
private LockInfo validateLockInformation(LockInfo lockInfo)
{
// Set default values for the lock details.
@@ -3001,7 +3001,7 @@ public class NodesImpl implements Nodes
{
throw new PermissionDeniedException("Current user doesn't have permission to unlock node " + nodeId);
}
lockService.unlock(nodeRef);
return getFolderOrDocument(nodeId, parameters);
}