Package org.alfresco.repo.webdav
Class WebDAVLockServiceImpl
java.lang.Object
org.alfresco.repo.webdav.WebDAVLockServiceImpl
- All Implemented Interfaces:
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.
- Author:
- Pavel.Yurkevich
-
Field Summary
Fields inherited from interface org.alfresco.repo.webdav.WebDAVLockService
BEAN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLockInfo(NodeRef nodeRef) Gets the lock status for the node reference relative to the current user.booleanisLockedAndReadOnly(NodeRef nodeRef) Determines if the node is locked AND it's not a WRITE_LOCK for the current user.voidShared method for webdav/vti protocols to lock node.voidvoidvoidvoidsetCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService) Set the CheckOutCheckInServicevoidsetCurrentSession(jakarta.servlet.http.HttpSession session) Caches current session to the thread local variablevoidsetLockService(LockService lockService) Set the LockServicevoidsetNodeService(NodeService nodeService) Set the NodeServicevoidsetTransactionService(TransactionService transactionService) Set the TransactionServicevoidShared method for webdav/vti to unlock node.
-
Constructor Details
-
WebDAVLockServiceImpl
public WebDAVLockServiceImpl()
-
-
Method Details
-
setLockService
Set the LockService- Parameters:
lockService- LockService
-
setNodeService
Set the NodeService- Parameters:
nodeService- NodeService
-
setTransactionService
Set the TransactionService- Parameters:
transactionService- TransactionService
-
setCheckOutCheckInService
Set the CheckOutCheckInService- Parameters:
checkOutCheckInService- CheckOutCheckInService
-
setCurrentSession
public void setCurrentSession(jakarta.servlet.http.HttpSession session) Caches current session to the thread local variable- Specified by:
setCurrentSessionin interfaceWebDAVLockService- Parameters:
session- HttpSession
-
sessionDestroyed
public void sessionDestroyed()- Specified by:
sessionDestroyedin interfaceWebDAVLockService
-
lock
- Specified by:
lockin interfaceWebDAVLockService
-
lock
Shared method for webdav/vti protocols to lock node. If node is locked for more than 24 hours it is automatically added to the current session locked resources list.- Specified by:
lockin interfaceWebDAVLockService- Parameters:
nodeRef- the node to lockuserName- userNametimeout- the number of seconds before the locks expires
-
lock
- Specified by:
lockin interfaceWebDAVLockService
-
unlock
Shared method for webdav/vti to unlock node. Unlocked node is automatically removed from current sessions's locked resources list.- Specified by:
unlockin interfaceWebDAVLockService- Parameters:
nodeRef- the node to lock
-
getLockInfo
Gets the lock status for the node reference relative to the current user.- Specified by:
getLockInfoin interfaceWebDAVLockService- Parameters:
nodeRef- the node reference- Returns:
- the lock status
- See Also:
-
isLockedAndReadOnly
Determines if the node is locked AND it's not a WRITE_LOCK for the current user.- Specified by:
isLockedAndReadOnlyin interfaceWebDAVLockService- Returns:
- true if the node is locked AND it's not a WRITE_LOCK for the current user
-