What I am trying to do is create a set of alfresco web scripts that will allow me to interact with the files in my webproject. I manage to make all the operations of a normal filesystem (list, edit, delete, rename, etc) but i have a huge problem with the lock mechanism. Once someone edits a file in his own sandbox the file must be locked.
Now in the listing of the files, i have access to a method called isLocked() that tells me if a node is locked or not and I can see the owner of the lock as well. These locks were added from the Alfresco default web interface.
And to my question, how can I lock/unlock a node from the a web script ?
Unfortunately there’s no Javascript bridge to the
LockService, meaning you need to develop a Java-backed Web Script. You will be then able to do something like: