ALF-12866: WebDAV should use in-memory locking for transient locks

Added a couple of comments and removed a redundant method parameter.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34175 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2012-02-22 18:06:59 +00:00
parent 8534a6e2b9
commit e579b15f15

View File

@@ -1145,7 +1145,7 @@ public abstract class WebDAVMethod
{ {
try try
{ {
lockInfo = getNodeLockInfoIndirect(nodeInfo, parent); lockInfo = getNodeLockInfoIndirect(parent);
if (lockInfo != null) if (lockInfo != null)
{ {
return lockInfo; return lockInfo;
@@ -1166,6 +1166,13 @@ public abstract class WebDAVMethod
} }
} }
/**
* Checks if a node is directly locked. A direct lock is one associated with the node itself
* rather than associated with some ancestor.
*
* @param nodeInfo
* @return The LockInfo if the node is <strong>locked</strong>, or null otherwise.
*/
private LockInfo getNodeLockInfoDirect(FileInfo nodeInfo) private LockInfo getNodeLockInfoDirect(FileInfo nodeInfo)
{ {
LockInfo lock = getLockStore().get(nodeInfo.getNodeRef()); LockInfo lock = getLockStore().get(nodeInfo.getNodeRef());
@@ -1178,7 +1185,13 @@ public abstract class WebDAVMethod
return null; return null;
} }
private LockInfo getNodeLockInfoIndirect(FileInfo nodeInfo, NodeRef parent) /**
* Checks whether a parent node has a lock that is valid for all its descendants.
*
* @param parent
* @return The LockInfo if the node is <strong>locked</strong>, or null otherwise.
*/
private LockInfo getNodeLockInfoIndirect(NodeRef parent)
{ {
LockInfo parentLock = getLockStore().get(parent); LockInfo parentLock = getLockStore().get(parent);