// update folder documents
NodeSet nodes = folderImpl.getAllNodes();
Iterator nodesIter = nodes.iterator();
while (nodesIter.hasNext())
{
Node node = (Node) nodesIter.next();
if (node instanceof Page)
{
updatePage((Page)node);
}
else if (node instanceof PageTemplate)
{
updatePageTemplate((PageTemplate)node);
}
else if (node instanceof DynamicPage)
{
updateDynamicPage((DynamicPage)node);
}
else if (node instanceof FragmentDefinition)
{
updateFragmentDefinition((FragmentDefinition)node);
}
else if (node instanceof Link)
{
updateLink((Link)node);
}
else if (node instanceof PageSecurity)
{
updatePageSecurity((PageSecurity)node);
}
}
// update folders last: breadth first recursion
nodesIter = nodes.iterator();
while (nodesIter.hasNext())
{
Node node = (Node) nodesIter.next();
if (node instanceof Folder)
{
updateFolder((Folder)node, true);
}
}