As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/** * Recursive find of all item head nodes from a given node ref * * @param nodeRef */ public List<NodeRef> findAllNodes(NodeRef nodeRef) throws Exception { List<NodeRef> nodes = new ArrayList<NodeRef>(); if(!this.dao.isNodeIgnored(nodeRef.toString())) { if(this.dao.isFolder(nodeRef)) { nodes.add(nodeRef); // add folder as well List<NodeRef> children= this.dao.getChildren(nodeRef); for (NodeRef child : children) { nodes.addAll(this.findAllNodes(child)); } } else { nodes.add(nodeRef); } } return nodes; } /** * The following functions are part of the dao class as referenced from above */ public boolean isNodeIgnored(String nodeRef) { log.debug("isNodeIgnored"); NodeRef nr = getNodeRef(nodeRef); QName value = nodeService.getType(nr); log.debug("isNodeIgnored got service type"); return isTypeIgnored(value); } public boolean isFolder(NodeRef nodeRef) throws Exception { FileInfo info = service.getFileInfo(nodeRef); return info.isFolder(); } public List<NodeRef> getChildren(NodeRef nodeRef) throws Exception { List<NodeRef> listChildren = new ArrayList<NodeRef>(); List<ChildAssociationRef> children = nodeService.getChildAssocs(nodeRef); for (ChildAssociationRef childAssociationRef : children) { NodeRef child = childAssociationRef.getChildRef(); if(this.isTypeIgnored(nodeService.getType(child))) { continue; } listChildren.add(new NodeRef(child.toString())); // deep copy } return listChildren; }
Hey,
Any chance that you were able to figure out what is the issue here. As we also facing the same issue.