wCMF
3.6
|
Public Member Functions | |
& | getInstance () |
handleLocking (&$object, $name) | |
aquireLock ($oid) | |
releaseLock ($oid) | |
releaseLocks ($oid) | |
releaseAllLocks () | |
getLockMessage ($lock, $objectText) | |
getLock ($oid) | |
& | getUser () |
aquireLockImpl ($useroid, $sessid, $oid, $lockDate) | |
releaseLockImpl ($useroid, $sessid, $oid) | |
releaseAllLocksImpl ($useroid, $sessid) | |
getLockImpl ($oid) | |
LockManager is used to handle lock requests on objects.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
This class defines abstract methods that subclasses must implement to support different lock storages.
Definition at line 39 of file class.LockManager.php.
& LockManager::getInstance | ( | ) |
Returns an instance of the class.
Definition at line 45 of file class.LockManager.php.
References ObjectFactory\getInstance(), InifileParser\getInstance(), and WCMFException\throwEx().
Referenced by PersistenceMapper\delete(), DeleteController\executeKernel(), SOAPController\executeKernel(), ConcurrencyController\executeKernel(), SaveController\executeKernel(), AssociateController\executeKernel(), DisplayController\executeKernel(), LoginController\executeKernel(), PersistentObject\getLock(), and handleLocking().
LockManager::handleLocking | ( | & | $object, |
$name | |||
) |
Lock a persistent object if it is not locked already and the current user is allowed to modify it.
object | The object to lock |
name | The display name of the object |
Definition at line 86 of file class.LockManager.php.
References ACTION_MODIFY, getInstance(), and RightsManager\getInstance().
Referenced by DisplayController\executeKernel().
LockManager::aquireLock | ( | $oid | ) |
Aquire a lock on an OID for the current user.
oid | object id of the object to lock. |
Definition at line 115 of file class.LockManager.php.
References aquireLockImpl(), SessionData\getInstance(), getLock(), getUser(), and PersistenceFacade\isValidOID().
LockManager::releaseLock | ( | $oid | ) |
Release a lock on an OID for the current user.
oid | object id of the object to release. |
Definition at line 137 of file class.LockManager.php.
References SessionData\getInstance(), getUser(), PersistenceFacade\isValidOID(), and releaseLockImpl().
LockManager::releaseLocks | ( | $oid | ) |
Release all locks on an OID regardless of the user.
oid | object id of the object to release. |
Definition at line 151 of file class.LockManager.php.
References PersistenceFacade\isValidOID(), and releaseLockImpl().
LockManager::releaseAllLocks | ( | ) |
Release all lock for the current user.
Definition at line 161 of file class.LockManager.php.
References SessionData\getInstance(), getUser(), and releaseAllLocksImpl().
LockManager::getLockMessage | ( | $lock, | |
$objectText | |||
) |
Get the default lock message for a lock.
lock | The Lock instance to construct the message for. |
objectText | The display text for the locked object. |
Definition at line 174 of file class.LockManager.php.
References Message\get().
LockManager::getLock | ( | $oid | ) |
Get lock data for an OID. This method may also be used to check for an lock.
oid | object id of the object to get the lock data for. |
Definition at line 190 of file class.LockManager.php.
References getLockImpl(), PersistenceFacade\isValidOID(), and releaseLockImpl().
Referenced by aquireLock().
& LockManager::getUser | ( | ) |
Get the currently logged in user.
Definition at line 213 of file class.LockManager.php.
References RightsManager\getInstance().
Referenced by aquireLock(), releaseAllLocks(), and releaseLock().
LockManager::aquireLockImpl | ( | $useroid, | |
$sessid, | |||
$oid, | |||
$lockDate | |||
) |
Aquire a lock on an OID for a given user.
useroid | The oid of the user. |
sessid | The id of the session of the user. |
oid | object id of the object to lock. |
lockDate | date of the lock. |
Definition at line 225 of file class.LockManager.php.
References WCMFException\throwEx().
Referenced by aquireLock().
LockManager::releaseLockImpl | ( | $useroid, | |
$sessid, | |||
$oid | |||
) |
Release a lock on an OID for a given user or all locks for that user or all locks for the OID. The behaviour depends on the given parameters. A null means that this parameter should be ignored
useroid | The oid of the user or null to ignore the userid. |
sessid | The id of the session of the user or null to ignore the session id. |
oid | object id of the object to release or null top ignore the oid. |
Definition at line 236 of file class.LockManager.php.
References WCMFException\throwEx().
Referenced by getLock(), releaseLock(), and releaseLocks().
LockManager::releaseAllLocksImpl | ( | $useroid, | |
$sessid | |||
) |
Release all lock for a given user.
useroid | The oid of the user. |
sessid | The id of the session of the user. |
Definition at line 245 of file class.LockManager.php.
References WCMFException\throwEx().
Referenced by releaseAllLocks().
LockManager::getLockImpl | ( | $oid | ) |
Get lock data for an OID. This method may also be used to check for an lock.
oid | object id of the object to get the lock data for. |
Definition at line 254 of file class.LockManager.php.
References WCMFException\throwEx().
Referenced by getLock().