Package org.alfresco.repo.node.db
Class NodeHierarchyWalker
java.lang.Object
org.alfresco.repo.node.db.NodeHierarchyWalker
Class that walks down a hierarchy gathering view details for later processing.
This class is not threadsafe and should be used sequentially on a single thread and then discarded.
- Since:
- 4.1.1
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassCarries data about a node in the hierarchy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNodes(boolean leafFirst) Return the IDs of the nodes visited in desired ordervoidwalkHierarchy(Pair<Long, NodeRef> nodePair, Pair<Long, ChildAssociationRef> parentAssocPair) Walk a hierachy
-
Constructor Details
-
NodeHierarchyWalker
- Parameters:
nodeDAO- the low-leve query service
-
-
Method Details
-
getNode
- Returns:
- the node data for the node ID or null if not visited
-
getNode
- Returns:
- the node data for the node reference or null if not visited
-
getNodes
Return the IDs of the nodes visited in desired order- Parameters:
leafFirst- true to list the leaf nodes first- Returns:
- the IDs of the nodes visited
-
walkHierarchy
public void walkHierarchy(Pair<Long, NodeRef> nodePair, Pair<Long, ChildAssociationRef> parentAssocPair) Walk a hierachy
-