ILIAS
release_4-3 Revision
|
Public Member Functions | |
ilDAVLocks () | |
lockRef ($refId, $iliasUserId, $davUser, $token, $expires, $depth, $scope) | |
Creates a lock an object, unless there are locks on the object or its parents, which prevent the creation of the lock. | |
lockWithoutCheckingDAV (&$objDAV, $iliasUserId, $davUser, $token, $expires, $depth, $scope) | |
Creates a write lock. | |
lockWithoutCheckingObj ($objId, $nodeId, $iliasUserId, $davUser, $token, $expires, $depth, $scope) | |
Creates a write lock. | |
updateLockWithoutCheckingDAV (&$objDAV, $token, $expires) | |
Updates a write lock. | |
updateLockWithoutCheckingObj ($objId, $nodeId, $token, $expires) | |
Updates a write lock. | |
unlockWithoutCheckingDAV (&$objDAV, $token) | |
Discards a write lock. | |
getLockDAV (&$objDAV, $token) | |
Returns the lock with the specified token on the specified DAV object. | |
getLocksOnObjectDAV (&$objDAV) | |
Returns all locks on the specified object. | |
getLocksOnObjectObj ($objId, $nodeId=0) | |
Returns all locks on the specified object id. | |
getLocksOnPathDAV (&$pathDAV) | |
Returns all locks on the specified object path. | |
getLocksOnPathRef ($refId) | |
Returns all locks on the specified object, specified by a reference id. | |
cleanUp () | |
System maintenance: get rid of locks that have expired over an hour ago. |
Protected Member Functions | |
writelog ($message) | |
Writes a message to the logfile.,. |
Private Attributes | |
$table = 'dav_lock' | |
$isDebug = false | |
Set this to true, to get debug output in the ILIAS log. |
Definition at line 42 of file class.ilDAVLocks.php.
ilDAVLocks::cleanUp | ( | ) |
System maintenance: get rid of locks that have expired over an hour ago.
Since we have no index over the 'expires' column, this causes a (very slow) table space scan.
Definition at line 526 of file class.ilDAVLocks.php.
References $row, ilObject\_getAllReferences(), and DB_FETCHMODE_ASSOC.
Referenced by unlockWithoutCheckingDAV().
ilDAVLocks::getLockDAV | ( | & | $objDAV, |
$token | |||
) |
Returns the lock with the specified token on the specified DAV object.
$objDAV | DAV object to get the lock for. |
string | Lock token. |
Definition at line 328 of file class.ilDAVLocks.php.
References $result, $row, DB_FETCHMODE_ASSOC, and writelog().
ilDAVLocks::getLocksOnObjectDAV | ( | & | $objDAV | ) |
Returns all locks on the specified object.
This method does not take into account inherited locks from parent objects.
$objDAV | DAV object to get the locks for. |
Definition at line 368 of file class.ilDAVLocks.php.
References getLocksOnObjectObj().
ilDAVLocks::getLocksOnObjectObj | ( | $objId, | |
$nodeId = 0 |
|||
) |
Returns all locks on the specified object id.
This method does not take into account inherited locks from parent objects.
$objId | object ID to get the locks for. |
int | node a node of the object. For example the id of a page of a learning module. Specify 0 if the object does not have multiple nodes. |
Definition at line 391 of file class.ilDAVLocks.php.
References $result, $row, DB_FETCHMODE_ASSOC, and writelog().
Referenced by getLocksOnObjectDAV().
ilDAVLocks::getLocksOnPathDAV | ( | & | $pathDAV | ) |
Returns all locks on the specified object path.
$pathDAV | Array with DAV objects to get the locks for. |
Definition at line 429 of file class.ilDAVLocks.php.
References $result, $row, DB_FETCHMODE_ASSOC, and writelog().
ilDAVLocks::getLocksOnPathRef | ( | $refId | ) |
Returns all locks on the specified object, specified by a reference id.
$refId | The reference id of the object |
Definition at line 482 of file class.ilDAVLocks.php.
References $result, $row, DB_FETCHMODE_ASSOC, and writelog().
Referenced by lockRef().
ilDAVLocks::ilDAVLocks | ( | ) |
Definition at line 49 of file class.ilDAVLocks.php.
ilDAVLocks::lockRef | ( | $refId, | |
$iliasUserId, | |||
$davUser, | |||
$token, | |||
$expires, | |||
$depth, | |||
$scope | |||
) |
Creates a lock an object, unless there are locks on the object or its parents, which prevent the creation of the lock.
As described in RFC2518, chapter 7.1, a write lock prevents all principals whithout the lock from successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, DELETE, or MKCOL on the locked resource. All other current methods, GET in particular, function independently of the lock. For a collection, the lock also affects the ability to add and remove members.
int | Reference id of the object to be locked. |
int | The id of a node of the object. For example the id of a page of a learning module. Specify 0 if the object does not have multiple nodes. |
int | ILIAS user id of the lock owner. |
string | DAV user of the lock owner. |
string | Lock token. |
int | expiration timestamp for the lock. |
bool | Depth of the lock. Must be 0 or 'infinity'. |
bool | Scope of the lock. Must be 'exclusive' or 'shared'. |
Definition at line 76 of file class.ilDAVLocks.php.
References $data, $result, getLocksOnPathRef(), lockWithoutCheckingObj(), updateLockWithoutCheckingObj(), and writelog().
ilDAVLocks::lockWithoutCheckingDAV | ( | & | $objDAV, |
$iliasUserId, | |||
$davUser, | |||
$token, | |||
$expires, | |||
$depth, | |||
$scope | |||
) |
Creates a write lock.
Important: This is a low-level function, which does not check on existing locks, before creating the lock data.
As described in RFC2518, chapter 7.1, a write lock prevents all principals whithout the lock from successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, DELETE, or MKCOL on the locked resource. All other current methods, GET in particular, function independently of the lock. For a collection, the lock also affects the ability to add and remove members.
$objDAV | DAV object to be locked. |
int | ILIAS user id of the lock owner. |
string | DAV user of the lock owner. |
string | Lock token. |
int | expiration timestamp for the lock. |
bool | Depth of the lock. Must be 0 or 'infinity'. |
bool | Scope of the lock. Must be 'exclusive' or 'shared'. |
Definition at line 162 of file class.ilDAVLocks.php.
References lockWithoutCheckingObj().
ilDAVLocks::lockWithoutCheckingObj | ( | $objId, | |
$nodeId, | |||
$iliasUserId, | |||
$davUser, | |||
$token, | |||
$expires, | |||
$depth, | |||
$scope | |||
) |
Creates a write lock.
Important: This is a low-level function, which does not check on existing locks, before creating the lock data. As described in RFC2518, chapter 7.1, a write lock prevents all principals whithout the lock from successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, DELETE, or MKCOL on the locked resource. All other current methods, GET in particular, function independently of the lock. For a collection, the lock also affects the ability to add and remove members. @param int id of the object to be locked. @param int node The id of a node of the object. For example the id of a page of a learning module. Specify 0 if the object does not have multiple nodes.
. *
int | ILIAS user id of the lock owner. |
string | DAV user of the lock owner. |
string | Lock token. |
int | expiration timestamp for the lock. |
bool | Depth of the lock. Must be 0 or 'infinity'. |
bool | Scope of the lock. Must be 'exclusive' or 'shared'. |
Definition at line 193 of file class.ilDAVLocks.php.
References $result, PEAR\isError(), and writelog().
Referenced by lockRef(), and lockWithoutCheckingDAV().
ilDAVLocks::unlockWithoutCheckingDAV | ( | & | $objDAV, |
$token | |||
) |
Discards a write lock.
Important: This is a low-level function, which does not check on existing locks, before deleting the lock data.
$objDAV | DAV object to be locked. |
string | Lock token. |
Definition at line 285 of file class.ilDAVLocks.php.
References $success, cleanUp(), and writelog().
ilDAVLocks::updateLockWithoutCheckingDAV | ( | & | $objDAV, |
$token, | |||
$expires | |||
) |
Updates a write lock.
Important: This is a low-level function, which does not check on existing locks, before updating the lock data.
string | Lock token. |
int | expiration timestamp for the lock. |
Definition at line 242 of file class.ilDAVLocks.php.
References updateLockWithoutCheckingObj().
ilDAVLocks::updateLockWithoutCheckingObj | ( | $objId, | |
$nodeId, | |||
$token, | |||
$expires | |||
) |
Updates a write lock.
Important: This is a low-level function, which does not check on existing locks, before updating the lock data.
string | Lock token. |
int | expiration timestamp for the lock. |
Definition at line 261 of file class.ilDAVLocks.php.
Referenced by lockRef(), and updateLockWithoutCheckingDAV().
|
protected |
Writes a message to the logfile.,.
message | String. |
Definition at line 575 of file class.ilDAVLocks.php.
References $log.
Referenced by getLockDAV(), getLocksOnObjectObj(), getLocksOnPathDAV(), getLocksOnPathRef(), lockRef(), lockWithoutCheckingObj(), and unlockWithoutCheckingDAV().
|
private |
Set this to true, to get debug output in the ILIAS log.
Definition at line 47 of file class.ilDAVLocks.php.
|
private |
Definition at line 44 of file class.ilDAVLocks.php.