ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Public Member Functions | |
__construct () | |
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. More... | |
lockWithoutCheckingDAV (&$objDAV, $iliasUserId, $davUser, $token, $expires, $depth, $scope) | |
Creates a write lock. More... | |
lockWithoutCheckingObj ($objId, $nodeId, $iliasUserId, $davUser, $token, $expires, $depth, $scope) | |
Creates a write lock. More... | |
updateLockWithoutCheckingDAV (&$objDAV, $token, $expires) | |
Updates a write lock. More... | |
updateLockWithoutCheckingObj ($objId, $nodeId, $token, $expires) | |
Updates a write lock. More... | |
unlockWithoutCheckingDAV (&$objDAV, $token) | |
Discards a write lock. More... | |
getLockDAV (&$objDAV, $token) | |
Returns the lock with the specified token on the specified DAV object. More... | |
getLocksOnObjectDAV (&$objDAV) | |
Returns all locks on the specified object. More... | |
getLocksOnObjectObj ($objId, $nodeId=0) | |
Returns all locks on the specified object id. More... | |
getLocksOnPathDAV (&$pathDAV) | |
Returns all locks on the specified object path. More... | |
getLocksOnPathRef ($refId) | |
Returns all locks on the specified object, specified by a reference id. More... | |
cleanUp () | |
System maintenance: get rid of locks that have expired over an hour ago. More... | |
Protected Member Functions | |
writelog ($message) | |
Writes a message to the logfile.,. More... | |
Private Attributes | |
$table = 'dav_lock' | |
$isDebug = false | |
Set this to true, to get debug output in the ILIAS log. More... | |
Definition at line 42 of file class.ilDAVLocks.php.
ilDAVLocks::__construct | ( | ) |
Definition at line 49 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 537 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $old, $r, $row, ilObject\_getAllReferences(), ilDBConstants\FETCHMODE_ASSOC, and time.
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 334 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $r, $result, $row, array, ilDBConstants\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 375 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 398 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $r, $result, $row, array, ilDBConstants\FETCHMODE_ASSOC, time, 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 437 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $r, $result, $row, array, ilDBConstants\FETCHMODE_ASSOC, time, 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 491 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $r, $result, $row, array, ilDBConstants\FETCHMODE_ASSOC, time, and writelog().
Referenced by lockRef().
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, $DIC, $result, $txt, 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 164 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.
int | id of the object to be locked. |
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 195 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $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 290 of file class.ilDAVLocks.php.
References $DIC, $ilDB, $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 245 of file class.ilDAVLocks.php.
References $DIC, $ilDB, and 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 265 of file class.ilDAVLocks.php.
Referenced by lockRef(), and updateLockWithoutCheckingDAV().
|
protected |
Writes a message to the logfile.,.
message | String. |
Definition at line 588 of file class.ilDAVLocks.php.
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.