// build ordered collection of descendant transient states in attic
// sorted by decreasing relative depth
// use a special attic-aware hierarchy manager
ZombieHierarchyManager zombieHierMgr =
new ZombieHierarchyManager(hierMgr.getRootNodeId(),
this,
transientStateMgr.getAttic(),
hierMgr.getNamespaceResolver());
// use an array of lists to group the descendants by relative depth;
// the depth is used as array index
List[] la = new List[10];
try {
Iterator iter = transientStateMgr.getEntriesInAttic();
while (iter.hasNext()) {
ItemState state = (ItemState) iter.next();
// determine relative depth: > 0 means it's a descendant
int depth = zombieHierMgr.getRelativeDepth(parentId, state.getId());
if (depth < 1) {
// not a descendant
continue;
}