9Sep/0610
Domino Document Locking Class 1.3
Here is an update to the Document Locking Class 1.1 and Document Locking Class , this update allows the unlocking overriding for Manager access (coded by Michael Sobczak) or overriding by group or role.
Public Sub new ( inDoc As Variant )
Public Sub SetCurrentUser ( user As String )
Public Function hasDocument ()
Public Sub setDocument ( inDoc As NotesDocument )
Public Sub setUIDocument ( inUIDoc As NotesUIDocument )
Public Property Get CurrentUser As String
Public Property Get toString As String
Public Property Get ShowPrompts As Boolean
Public Property Set ShowPrompts As Boolean
Public Function LockingEnabled () As Boolean
Public Function IsLockedByCurrentUser () As Boolean
Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
Public Function LockedBy ( ) As String
Public Function IsLocked ( ) As Boolean
Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLocked ( uiDoc As NotesUIDocument ) As Boolean
Public Function Lock ( ) As Boolean
Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function LockDocument ( doc As NotesDocument ) As Boolean
Public Function UnLock ( ) As Boolean
Public Function UnLockUIDocument ( uiDoc As NotesUIDocument ) As Boolean
Public Function UnLockDocument ( doc As NotesDocument ) As Boolean
Public Sub RoleGroupOverRide ( RoleGroup As String )
Public Sub SetCurrentUser ( user As String )
Public Function hasDocument ()
Public Sub setDocument ( inDoc As NotesDocument )
Public Sub setUIDocument ( inUIDoc As NotesUIDocument )
Public Property Get CurrentUser As String
Public Property Get toString As String
Public Property Get ShowPrompts As Boolean
Public Property Set ShowPrompts As Boolean
Public Function LockingEnabled () As Boolean
Public Function IsLockedByCurrentUser () As Boolean
Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
Public Function LockedBy ( ) As String
Public Function IsLocked ( ) As Boolean
Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLocked ( uiDoc As NotesUIDocument ) As Boolean
Public Function Lock ( ) As Boolean
Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function LockDocument ( doc As NotesDocument ) As Boolean
Public Function UnLock ( ) As Boolean
Public Function UnLockUIDocument ( uiDoc As NotesUIDocument ) As Boolean
Public Function UnLockDocument ( doc As NotesDocument ) As Boolean
Public Sub RoleGroupOverRide ( RoleGroup As String )
October 17th, 2006 - 08:24
Hi Chad,
just want to emphasize the requirement for overiding the manager access:
Unlocking without manager rights does only work if you are explicitly listed in an author item of the document – by Name, Role or Groupmembership.
Editor or designer access does not suffice.
Otherwise you recieve an error that the document is already locked by another user. :-
Thanks for sharing.
VM
February 29th, 2008 - 01:27
Hi Chad
Is that work on the web?
And with a load balancing cluster…
Thanks
February 29th, 2008 - 10:06
I have used it on the web, so yes it will. As for the balancing cluster, it should work because this class is using the Domino Document Locking feature and nothing else, this class is just a wrapper to handle the common errors/situations that are not provided by Domino.
October 1st, 2008 - 04:09
Hi Chad, great work the Domino Document Locking Class, but I’ve got a problem unlocking a doc using that code from a web agent. The problem is in line
pUser = Session.UserName
because Session.UsersName returns the server name where the agent is executed rather than the user name, so when you check if user can unlock a doc the comparison always fails.
I avoid that issue using this code
pUser = Session.EffectiveUserName
I don’t check if with this change the code still work on client.
October 1st, 2008 - 05:16
October 1st, 2008 - 05:49
Thanks Dennis I will take a look at it.
November 11th, 2008 - 14:36
I am new to Domino. Where do I past the document locking logic.
November 14th, 2008 - 06:53
I would place the code into a script library so it can be used by anything.
June 1st, 2009 - 07:19
Chad I need a help,
I paste code ‘Domino Document Locking’ in script library.
Where and how I can call function from this class.
Thank’s Bojana
June 9th, 2009 - 12:47
Bojana, it all depends on what you need done. Is this a UI or backend usage. For the most basic usage you would need to call LockUIDocument and UnLockUIDocument if you where need to lock a UI document.