@API(src=PRIVATE,
type=NOT_EXTENDABLE)
public class WebdavLockHelper
extends java.lang.Object
| Constructor and Description |
|---|
WebdavLockHelper()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLockHeader(java.lang.String sessionId,
java.net.HttpURLConnection conn)
Adds the lock header so that we can perform write operations on a
resource that we locked ourselves.
|
long |
getServerPreferredTimeout() |
boolean |
isLockEnabled()
Checks if locking is enabled.
|
boolean |
isSaveAllowed(java.lang.String sessionId,
java.net.URL url,
int timeoutSeconds)
Checks if save is allowed for a resource identified by its URL.
|
void |
setLockOwner(java.lang.String sessionId,
java.lang.String lockOwnerName)
Sets the lock owner for the specified session Id.
|
void |
unlock(java.lang.String sessionId,
java.net.URL resource)
Unlock a given resource.
|
void |
updateLock(java.lang.String sessionId,
java.net.URL resource,
int lockTimeoutSeconds)
Lock a given resource.
|
public void updateLock(java.lang.String sessionId,
java.net.URL resource,
int lockTimeoutSeconds)
throws LockException
sessionId - The session ID.resource - The resource to locklockTimeoutSeconds - The timeout in seconds.LockExceptionpublic void setLockOwner(java.lang.String sessionId,
java.lang.String lockOwnerName)
sessionId - The session Id.lockOwnerName - The lock owner.public void unlock(java.lang.String sessionId,
java.net.URL resource)
throws LockException
sessionId - The session Id.resource - The resource to unlockLockExceptionpublic boolean isLockEnabled()
true if locking is enabledpublic long getServerPreferredTimeout()
public boolean isSaveAllowed(java.lang.String sessionId,
java.net.URL url,
int timeoutSeconds)
sessionId - The session ID.url - The URL for which the check is performed.timeoutSeconds - The timeout in seconds to set for the lock .true if saving is allowed.public void addLockHeader(java.lang.String sessionId,
java.net.HttpURLConnection conn)
sessionId - The session ID.conn - The connection to enrich with the lock header.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.