01: package ru.emdev.EmForge.wiki.plugins;
02:
03: import java.util.Map;
04:
05: import com.ecyrd.jspwiki.WikiContext;
06: import com.ecyrd.jspwiki.plugin.PluginException;
07: import com.ecyrd.jspwiki.plugin.WikiPlugin;
08:
09: /** Plugin to place SourceForge icon in wiki-page */
10: public class SourceForgePlugin implements WikiPlugin {
11: public static final String PARAM_PROJECT_ID = "projectId";
12:
13: public String execute(WikiContext i_context, Map i_params)
14: throws PluginException {
15:
16: String projectId = (String) i_params.get(PARAM_PROJECT_ID);
17:
18: String format = "<img src=\"http://sflogo.sourceforge.net/sflogo.php?group_id=%s\"></img>";
19:
20: String out = String.format(format, projectId);
21:
22: return out;
23: }
24: }
|