use of org.apache.wiki.references.ReferenceManager in project jspwiki by apache.
the class ReferredPagesPlugin method getReferredPages.
/**
* Retrieves a list of all referred pages. Is called recursively depending on the depth parameter.
*/
private void getReferredPages(final Context context, final String pagename, int depth) {
if (depth >= m_depth) {
// end of recursion
return;
}
if (pagename == null) {
return;
}
if (!m_engine.getManager(PageManager.class).wikiPageExists(pagename)) {
return;
}
final ReferenceManager mgr = m_engine.getManager(ReferenceManager.class);
final Collection<String> allPages = mgr.findRefersTo(pagename);
handleLinks(context, allPages, ++depth, pagename);
}
Aggregations