Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

59253: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      59199: Reverse Merged as it caused regression MNT-10075
         55285: Merged BRANCHES/DEV/BELARUS/HEAD-2013_08_27 to BRANCHES/V4.2:
             55068: ALF-19915 : MT and WebDAV: Content is lost when uploading non-empty document


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62117 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-12 01:17:23 +00:00
parent efca2709c9
commit 97569e7dba

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2005-2013 Alfresco Software Limited. * Copyright (C) 2005-2012 Alfresco Software Limited.
* *
* This file is part of Alfresco * This file is part of Alfresco
* *
@@ -27,25 +27,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
public class LockUtils public class LockUtils
{ {
/**
* Indicates if the node is locked AND the current user is not lock owner.
*
* @param nodeRef node reference
* @param lockService LockService
*/
public static boolean isLockedAndNotLockOwner(NodeRef nodeRef, LockService lockService)
{
LockStatus lockStatus = lockService.getLockStatus(nodeRef);
switch (lockStatus)
{
case NO_LOCK:
case LOCK_EXPIRED:
case LOCK_OWNER:
return false;
default:
return true;
}
}
/** /**
* Indicates if the node is locked AND it's not a WRITE_LOCK for the current user.<p> * Indicates if the node is locked AND it's not a WRITE_LOCK for the current user.<p>