Kernel::System::Lock - lock lib
All lock functions.
The whole lock API is just for "reading" lock states. By default, there is "unlock", "lock" and "lock-tmp". Usually you would not modify those lock states, because there is no use case for this.
create an object
my $LockObject = $Kernel::OM->Get('Kernel::System::Lock');
get list of view-able lock types (used to show available tickets)
my @List = $LockObject->LockViewableLock( Type => 'Name', # ID|Name );
Returns:
@List = ( 'unlock', 'lock', 'lock-tmp' ); my @ListID = $LockObject->LockViewableLock( Type => 'ID', # ID|Name );
Returns:
@List = ( 1, 2, 3 );
lock state lookup by ID or Name
my $LockID = $LockObject->LockLookup( Lock => 'lock' ); my $Lock = $LockObject->LockLookup( LockID => 2 );
get lock state list
my %List = $LockObject->LockList( UserID => 123, );
Returns:
%List = ( 1 => 'unlock', 2 => 'lock', 3 => 'tmp_lock', );
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.