use of org.apache.wiki.WikiEngine in project jspwiki by apache.
the class EditorIteratorTag method doStartTag.
public final int doStartTag() {
m_wikiContext = WikiContext.findContext(pageContext);
WikiEngine engine = m_wikiContext.getEngine();
EditorManager mgr = engine.getEditorManager();
String[] editorList = mgr.getEditorList();
Collection<Editor> editors = new ArrayList<Editor>();
for (int i = 0; i < editorList.length; i++) {
editors.add(new Editor(m_wikiContext, editorList[i]));
}
setList(editors);
return super.doStartTag();
}
use of org.apache.wiki.WikiEngine in project jspwiki by apache.
the class HasAttachmentsTag method doWikiStartTag.
public final int doWikiStartTag() throws IOException {
WikiEngine engine = m_wikiContext.getEngine();
WikiPage page = m_wikiContext.getPage();
AttachmentManager mgr = engine.getAttachmentManager();
try {
if (page != null && engine.pageExists(page) && mgr.attachmentsEnabled()) {
if (mgr.hasAttachments(page)) {
return EVAL_BODY_INCLUDE;
}
}
} catch (ProviderException e) {
log.fatal("Provider failed while trying to check for attachements", e);
// FIXME: THrow something.
}
return SKIP_BODY;
}
Aggregations