Web 脚本中的 Alfresco 节点锁定
我想做的是创建一组露天 Web 脚本,使我能够与 Web 项目中的文件进行交互。我设法进行普通文件系统的所有操作(列表、编辑、删除、重命名等),但锁定机制存在巨大问题。一旦有人在自己的沙箱中编辑文件,该文件就必须被锁定。
现在,在文件列表中,我可以访问一个名为 isLocked() 的方法,它告诉我节点是否被锁定,并且我还可以看到锁的所有者。这些锁是从 Alfresco 默认 Web 界面添加的。
对于我的问题,如何从网络脚本锁定/解锁节点?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,没有 Javascript 桥接
LockService
,意味着你需要开发一个Java 支持的 Web 脚本。然后您将能够执行以下操作: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:我想你可以做两件事:
1)使用签入/签出Javascript API Wiki位置。如果文档被签出,它将被锁定并置于只读模式。用户完成后可以签入。
2)使用带有纯Java的Java支持的Webscript,您可以对其进行更多控制。您可以锁定、解锁等。
I guess you can do two things:
1) use the Check-in/out Javascript API Wiki location. If a document is checked-out it will get locked and put in Read-Only mode. And the user can check it in, when he's done.
2) use a Java Backed Webscript with pure Java, you have more control on it. You can lock, unlock etc.