I am writing a web script to get a list of all the checkout documents and user who has them checked out.
I can use this api to get a Boolean answer of whether a document is checked out or not;
var docNode = search.findNode("workspace://SpacesStore/"+alfid);
model.foo = docNode.hasAspect("cm:workingcopy");
Now, I need to find the lock owner for this docNode, I tried this api but it doesn't return anything:
model.boo = docNode.properties["cm:lockOwner"]
Any suggestions?
Solved! Go to Solution.
Hi,
You can use alternate solution with java backed webscript.
if (nodeService.hasAspect(nodeRefOriginal,ContentModel.ASPECT_WORKING_COPY)) {
String docName=(String)nodeService.getProperty(nodeRefOriginal, ContentModel.PROP_NAME);
String workingCopyOwner= (String)nodeService.getProperty(nodeRefOriginal,ContentModel.PROP_WORKING_COPY_OWNER);
}
Thanks,
Sanjay
Hi,
You can use alternate solution with java backed webscript.
if (nodeService.hasAspect(nodeRefOriginal,ContentModel.ASPECT_WORKING_COPY)) {
String docName=(String)nodeService.getProperty(nodeRefOriginal, ContentModel.PROP_NAME);
String workingCopyOwner= (String)nodeService.getProperty(nodeRefOriginal,ContentModel.PROP_WORKING_COPY_OWNER);
}
Thanks,
Sanjay
Thanks.
Also, I got the correct property from Node Browser:
model.boo = docNode.properties["cm:workingCopyOwner"]
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.