public class WebDAVLockServiceImpl extends Object implements WebDAVLockService
WebDAVLockService is used to manage file locks for WebDAV and Sharepoint protocol. It ensures a lock never persists for more than 24 hours, and also ensures locks are timed out on session timeout.
BEAN_NAME
Constructor and Description |
---|
WebDAVLockServiceImpl() |
Modifier and Type | Method and Description |
---|---|
LockInfo |
getLockInfo(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the lock status for the node reference relative to the current user.
|
boolean |
isLockedAndReadOnly(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Determines if the node is locked AND it's not a WRITE_LOCK for the current user.
|
void |
lock(org.alfresco.service.cmr.repository.NodeRef nodeRef,
LockInfo lockInfo) |
void |
lock(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String userName,
int timeout)
Shared method for webdav/vti protocols to lock node.
|
void |
sessionDestroyed() |
void |
setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
Set the CheckOutCheckInService
|
void |
setCurrentSession(HttpSession session)
Caches current session to the thread local variable
|
void |
setLockService(LockService lockService)
Set the LockService
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the NodeService
|
void |
setTransactionService(TransactionService transactionService)
Set the TransactionService
|
void |
unlock(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Shared method for webdav/vti to unlock node.
|
public void setLockService(LockService lockService)
lockService
- LockServicepublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- NodeServicepublic void setTransactionService(TransactionService transactionService)
transactionService
- TransactionServicepublic void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
checkOutCheckInService
- CheckOutCheckInServicepublic void setCurrentSession(HttpSession session)
setCurrentSession
in interface WebDAVLockService
session
- HttpSessionpublic void sessionDestroyed()
sessionDestroyed
in interface WebDAVLockService
public void lock(org.alfresco.service.cmr.repository.NodeRef nodeRef, LockInfo lockInfo)
lock
in interface WebDAVLockService
public void lock(org.alfresco.service.cmr.repository.NodeRef nodeRef, String userName, int timeout)
lock
in interface WebDAVLockService
nodeRef
- the node to lockuserName
- userNametimeout
- the number of seconds before the locks expirespublic void unlock(org.alfresco.service.cmr.repository.NodeRef nodeRef)
unlock
in interface WebDAVLockService
nodeRef
- the node to lockpublic LockInfo getLockInfo(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getLockInfo
in interface WebDAVLockService
nodeRef
- the node referenceLockService.getLockStatus(org.alfresco.service.cmr.repository.NodeRef, String)
public boolean isLockedAndReadOnly(org.alfresco.service.cmr.repository.NodeRef nodeRef)
isLockedAndReadOnly
in interface WebDAVLockService
Copyright © 2005–2017 Alfresco Software. All rights reserved.