Qore xml Module 2.1.0
Loading...
Searching...
No Matches
WebDavHandler::AbstractWebDavLockHandler Class Reference

Abstract interface for WebDAV lock handlers. More...

#include <AbstractWebDavLockHandler.qc.dox.h>

Inheritance diagram for WebDavHandler::AbstractWebDavLockHandler:
WebDavHandler::InMemoryWebDavLockHandler

Public Member Methods

abstract string lock (string resource, hash< WebDavLockInfo > lock_info)
 Acquire a lock on a resource.
 
abstract bool unlock (string resource, string token)
 Release a lock.
 
abstract bool refresh (string token, int timeout)
 Refresh an existing lock's timeout.
 
abstract soft< hash< WebDavLockInfo > > getLock (string token)
 Get lock information for a specific token.
 
abstract list< hash< WebDavLockInfo > > getLocks (string resource)
 Get all locks on a resource.
 
abstract soft< string > isLocked (string resource, soft< string > exclude_token)
 Check if a resource is locked.
 
abstract void cleanExpired ()
 Clean up expired locks.
 
string generateLockToken ()
 Clean up expired locks.
 

Detailed Description

Abstract interface for WebDAV lock handlers.

This class provides the interface for managing WebDAV locks on resources. Implementations must handle lock storage, conflict detection, and expiration.

Member Function Documentation

◆ getLock()

abstract soft< hash< WebDavLockInfo > > WebDavHandler::AbstractWebDavLockHandler::getLock ( string  token)

Get lock information for a specific token.

Parameters
tokenthe lock token
Returns
the lock information, or NOTHING if not found

◆ getLocks()

abstract list< hash< WebDavLockInfo > > WebDavHandler::AbstractWebDavLockHandler::getLocks ( string  resource)

Get all locks on a resource.

Parameters
resourcethe resource path
Returns
a list of lock information hashes, or an empty list if none

◆ isLocked()

abstract soft< string > WebDavHandler::AbstractWebDavLockHandler::isLocked ( string  resource,
soft< string >  exclude_token 
)

Check if a resource is locked.

Parameters
resourcethe resource path to check
exclude_tokenoptional token to exclude from conflict check
Returns
the conflicting lock token if locked, or NOTHING if not locked

◆ lock()

abstract string WebDavHandler::AbstractWebDavLockHandler::lock ( string  resource,
hash< WebDavLockInfo lock_info 
)

Acquire a lock on a resource.

Parameters
resourcethe resource path to lock
lock_infothe lock information
Returns
the lock token
Exceptions
LOCK-CONFLICTif the resource is already locked in a conflicting way

◆ refresh()

abstract bool WebDavHandler::AbstractWebDavLockHandler::refresh ( string  token,
int  timeout 
)

Refresh an existing lock's timeout.

Parameters
tokenthe lock token to refresh
timeoutthe new timeout in seconds
Returns
True if the lock was found and refreshed, False otherwise

◆ unlock()

abstract bool WebDavHandler::AbstractWebDavLockHandler::unlock ( string  resource,
string  token 
)

Release a lock.

Parameters
resourcethe resource path
tokenthe lock token to release
Returns
True if the lock was found and released, False otherwise

The documentation for this class was generated from the following file: