use of org.apache.wiki.api.plugin.ParserStagePlugin in project jspwiki by apache.
the class PluginContent method executeParse.
/**
* Executes the executeParse() method.
*
* @param context The WikiContext
* @throws PluginException If something goes wrong.
*/
public void executeParse(WikiContext context) throws PluginException {
PluginManager pm = context.getEngine().getPluginManager();
if (pm.pluginsEnabled()) {
ResourceBundle rb = Preferences.getBundle(context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE);
Map<String, String> params = getParameters();
WikiPlugin plugin = pm.newWikiPlugin(getPluginName(), rb);
try {
if (plugin != null && plugin instanceof ParserStagePlugin) {
((ParserStagePlugin) plugin).executeParser(this, context, params);
}
} catch (ClassCastException e) {
throw new PluginException(MessageFormat.format(rb.getString("plugin.error.notawikiplugin"), getPluginName()), e);
}
}
}
Aggregations