05-18-2012 12:23 PM
//java code
SiteInfo site = siteService.getSite("shortname");
String name = "documentLibrary";
List<ChildAssociationRef> children = nodeService.getChildAssocs(site.getNodeRef());
if (log.isTraceEnabled()) {
log.trace("Found: " + children.size() + " children of " + parent.toString());
}
for (ChildAssociationRef child : children) {
NodeRef temp = child.getChildRef();
Map<QName, Serializable> properties = nodeService.getProperties(temp);
String nameProp = (String) properties.get(ContentModel.PROP_NAME);
if (log.isTraceEnabled()) {
log.trace("Checking node [" + temp + "] with name [" + nameProp + "]");
log.trace(nameProp + " == " + name + "(" + (nameProp.equals(name)) + ")");
}
if (nameProp.equals(name)) {
return temp;
}
}
#alfresco.log
11:32:42,382 TRACE Found: 1 children of workspace://SpacesStore/e673ec52-de3b-4bc8-9e10-1b19cc2d9632
11:32:42,385 TRACE Checking node [workspace://SpacesStore/7aac6e26-d6fa-4405-9ac2-d76155fa0488] with name [surf-config]
11:32:42,386 TRACE surf-config == documentLibrary(false)
#node browser
surf-config workspace://SpacesStore/7aac6e26-d6fa-4405-9ac2-d76155fa0488
documentLibrary workspace://SpacesStore/b09a3e14-981b-4a27-80cc-66bf407e4ee0
both have the same permissions including: "ReadPermissions GROUP_EVERYONE ALLOWED"05-19-2012 04:00 AM
// Get the documentLibrary of the site.
NodeRef docLib = siteService().getContainer(siteInfo.getShortName(), "documentlibrary");
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.