{
List proxies = null;
Iterator childrenIter = children.iterator();
while (childrenIter.hasNext())
{
Node child = (Node)childrenIter.next();
if ((!onlyVisible || !child.isHidden() || (child == currentPage)) &&
(!onlyViewable || isProxyViewable(child, onlyVisible)))
{
if (proxies == null)
{
proxies = new ArrayList(children.size());
}
proxies.add(child);
}
}
return proxies;
}
}
else
{
// access remaining path as page, folder, or link
// node proxy; return null if not found or not
// viewable and visiblity is required
Node child = children.get(currentRegexpPath);
if ((child != null) && (!onlyVisible || !child.isHidden() || (child == currentPage)) &&
(!onlyViewable || isProxyViewable(child, onlyVisible)))
{
List proxies = new ArrayList(1);
proxies.add(currentFolder);
return proxies;