SCM APIs - use auto lock to imitate reserved check-out
![]()
I am trying to implement an auto lock or unlock mechanism to imitate a reserved check-out when certain UI action is performed by the user.
Specifically, what are the APIs for the following operations: (1) Given one file or multiple files in my workspace, how to know if each file is locked or unlocked, and if it is by whom? (2) What is the recommended (reliable) approach for locking and unlocking a file or multiple files? Any help will be greatly appreciated. Thanks, Weiping |
Accepted answer
3 other answers
![]()
Using client API:
IWorkspaceManager#applyLockOperations() - to lock/unlock
IWorkspaceManager#getLocks() - to see the locks the user currently holds
IWorkspaceManager#findLocks() to query locks by user or component or stream
Hope this helps,
JohnC
Jazz SCM Lead
|
![]()
Hi John/Andrew,
Thank you very much ! I have also learn some more from debugging into RTC's LockAction, UnlockAction and some of APIs used by change view label provider decoration class. Weiping |
![]()
Hello
the API seems helpful but weather the lock API can be called via Operation advisor? if yes than from which event in the Operation Behavior this can be configured? Like for Save work item the "Save Work Item(Server)" event is there present. |