03-23-2011 07:14 AM
public static NodeRef findChildNodeRef(NodeRef parentSpaceNodeRef, String nodeName, ServiceRegistry serviceRegistry)
{
NodeService nodeService = serviceRegistry.getNodeService();
NodeRef nodeRef = nodeService.getChildByName(parentSpaceNodeRef, ContentModel.ASSOC_CONTAINS, ISO9075.encode(nodeName));
return nodeRef;
}
RootSpace
-
|-Space1
| -
| |-ChildSpace1
| |-ChildSpace2
|
|
|-Space2
-
|-ChildSpace3
|-ChildSpace4
And Im calling
NodeRef Space1NodeRef = findChildNodeRef(RootSpaceNodeRef, "Space1", serviceRegistry);
NodeRef childSpace1NodeRef = findChildNodeRef(Space1NodeRef, "ChildSpace1", serviceRegistry);
03-23-2011 08:25 AM
03-23-2011 09:01 AM
03-23-2011 09:15 AM
03-23-2011 09:19 AM
03-24-2011 01:02 PM
I don't think it is neccessary to encode the "name". This is not a Lucene/XPATH search.
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.