Merged V4.1-BUG-FIX to HEAD

47581: Merged DEV to V4.1-BUG-FIX (with corrections)
      47557: ALF-16846 : Checkout version from Microsoft Office does not work
      AlfrescoCheckOutCheckInServiceHandler.checkOutDocument() was changed. Now we unlock before checkout if current user is LOCK_OWNER and a node has a WRITE_LOCK lock type. 
   47584: Remove unused import
   47586: Merged V3.4-BUG-FIX to V4.1-BUG-FIX
      47583: Add serialVersionUID for Path$Element (see ALF-18265)
   47599: Set Surf version to 1.2.0-SNAPSHOT in POMs
   47616: Workaround ALF-16888: NodeServiceTest.testConcurrentArchive() failing on DB2
    - This test no longer runs on DB2
    - Unable to find configuration that allows it to succeed
   47640: Merged PATCHES/V4.1.4 to V4.1-BUG-FIX
      47576: Merged DEV to PATCHES/V4.1.4
         47560: ALF-18248 : Upgrade from 3.2.2 to 4.1.4 fails with java.lang.NullPointerException when applying patch 'patch.thumbnailsAssocQName'
         Test for null value was added to the QNamePatch#applyInternal() method.
      47638: ALF-18258: Alfresco does not start with XAM module applied
      - Broke circular dependency in storeSelectorContentStoreBase
      47639: ALF-18249: Fixed performance-killing typo discovered by Kev!
      - One innocent ! sign got lost


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47642 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2013-03-06 12:20:33 +00:00
parent e8dd4b8e66
commit 65a802b9c8
2 changed files with 19 additions and 9 deletions

View File

@@ -25,15 +25,13 @@ import java.util.List;
import javax.servlet.http.HttpSession;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.lock.LockUtils;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.Auditable;
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockStatus;
import org.alfresco.service.cmr.lock.LockType;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.transaction.TransactionService;
@@ -365,12 +363,21 @@ public class WebDAVLockServiceImpl implements WebDAVLockService
* @return the lock status
*/
@Override
@Auditable(parameters = {"nodeRef"})
public LockInfo getLockInfo(NodeRef nodeRef)
{
return lockStore.get(nodeRef);
}
/**
* Determines if the node is locked AND it's not a WRITE_LOCK for the current user.<p>
*
* @return true if the node is locked AND it's not a WRITE_LOCK for the current user
*/
public boolean isLockedAndReadOnly(NodeRef nodeRef)
{
return LockUtils.isLockedAndReadOnly(nodeRef, this.lockService);
}
/**
* Add the given <code>object</code> to the session list that is stored in session under <code>listName</code> attribute
*