The locks functionality in Control/ECS GUI provides a mechanism to ensure exclusive access to detectors during operations. This prevents conflicts when multiple users attempt to configure or control the same detector simultaneously.
All LOCKs operations require an authenticated user session and moreover:
- Lock Operations require a role of minimum
Role.DETECTOR. - Lock Operations on
ALLdetectors require a minimum role ofRole.GLOBAL. - Forced Lock Operations require a role of minimum
Role.GLOBAL. - Forced Lock Operations on
ALLdetectors require a minimum role ofRole.ADMIN.
Each detector can be in one of the following lock states:
- Released: The detector is available to be locked by any user
- Taken: The detector is currently locked by a specific user
Acquires a lock on a detector for the current user.
Parameters:
detectorId: The individual detector identifier orALLto lock all detectors (excluding TST)action:TAKEshouldForce(optional): Boolean flag to force taking the lock even if held by another user
Behavior:
- When
detectorIdisALLand the user has a role of at leastGLOBAL, locks all detectors except TST - If a lock is already held by another user and:
shouldForceisfalse, the request will fail.shouldForceistrueand the user has a role of at leastGLOBALfor individual detector and at leastADMINfor detectorALL, the lock will be taken regardless of current ownership
Releases a lock on a detector. If the detector is currently reported as Active by ECS, the release lock button will prompt the user to confirm the action is indeed correct.
Parameters:
detectorId: The detector identifier orALLto release all locks (excluding TST)action:RELEASEshouldForce(optional): Boolean flag to force releasing the lock even if held by another user
Behavior:
- When
detectorIdisALLand the user has a role of at leastGLOBAL, releases locks on all detectors except TST - If a lock is already held by another user and:
shouldForceisfalse, the request will fail.shouldForceistrueand the user has a role of at leastGLOBALfor individual detector and at leastADMINfor detectorALL, the lock will be released regardless of current ownership
The TST (test) detector is treated specially:
- When using
ALLas the detector ID, TST is excluded from both TAKE and RELEASE operations - TST must be taken/released explicitly by using
TSTas the detector ID - Moreover, front-end pages are also:
- excluding TST from being displayed if on
Globalpage - displaying TST at the end with separator if on
+CreateorLockspages
- excluding TST from being displayed if on
The lock controller handles the following error cases:
- Missing
detectorIdparameter → ReturnsInvalidInputError - Invalid
actionparameter → ReturnsInvalidInputError - Lock conflicts (when not forcing) → Error from LockService