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(NodeRef nodeRef)
Gets the lock status for the node reference relative to the current user.
|
boolean |
isLockedAndReadOnly(NodeRef nodeRef)
Determines if the node is locked AND it's not a WRITE_LOCK for the current user.
|
void |
lock(NodeRef nodeRef,
LockInfo lockInfo) |
void |
lock(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(javax.servlet.http.HttpSession session)
Caches current session to the thread local variable
|
void |
setLockService(LockService lockService)
Set the LockService
|
void |
setNodeService(NodeService nodeService)
Set the NodeService
|
void |
setTransactionService(TransactionService transactionService)
Set the TransactionService
|
void |
unlock(NodeRef nodeRef)
Shared method for webdav/vti to unlock node.
|
public void setLockService(LockService lockService)
lockService - public void setNodeService(NodeService nodeService)
nodeService - public void setTransactionService(TransactionService transactionService)
transactionService - public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
checkOutCheckInService - public void setCurrentSession(javax.servlet.http.HttpSession session)
setCurrentSession in interface WebDAVLockServicecurrentSession - public void sessionDestroyed()
sessionDestroyed in interface WebDAVLockServicepublic void lock(NodeRef nodeRef, LockInfo lockInfo)
lock in interface WebDAVLockServicepublic void lock(NodeRef nodeRef, String userName, int timeout)
lock in interface WebDAVLockServicenodeRef - the node to locklockType - the lock typetimeout - the number of seconds before the locks expirespublic void unlock(NodeRef nodeRef)
unlock in interface WebDAVLockServicenodeRef - the node to lockpublic LockInfo getLockInfo(NodeRef nodeRef)
getLockInfo in interface WebDAVLockServicenodeRef - the node referenceLockService#getLockStatus(NodeRef, NodeRef)public boolean isLockedAndReadOnly(NodeRef nodeRef)
isLockedAndReadOnly in interface WebDAVLockServiceCopyright © 2005–2014 Alfresco Software. All rights reserved.