*/
public class OhlohMacro extends AbstractMacro {
public void execute(Sink sink, MacroRequest request) throws MacroExecutionException {
String project = (String)request.getParameter("project");
if (project == null) {
throw new MacroExecutionException("'project' macro parameter is required");
}
String widgets = (String)request.getParameter("widgets");
if (widgets == null) {
throw new MacroExecutionException("'widgets' macro parameter is required");
}
for (String widget : widgets.split(",")) {
sink.rawText("<div class=\"gadgetContainer\" style=\"float: left\"><script type=\"text/javascript\" src=\"http://www.ohloh.net/p/"
+ project + "/widgets/project_" + widget + ".js\"></script></div>");
}