19 package org.turro.content;
21 import java.io.StringWriter;
22 import java.io.Writer;
23 import org.turro.action.content.AbstractContentProvider;
24 import org.turro.action.content.ContentRenderer;
25 import org.turro.action.content.IContentIterator;
26 import org.turro.annotation.ContentProvider;
27 import org.turro.command.MacroCommand;
28 import org.turro.elephant.context.HeadlessApplication;
29 import org.turro.plugin.contacts.IContact;
42 private void addCommands() {
43 MacroCommand mc =
new MacroCommand(
"polls");
44 mc.addParameter(
"context",
"",
true);
45 mc.addParameter(
"count", Integer.valueOf(10),
true);
46 mc.addParameter(
"restricted", Boolean.TRUE,
true);
47 mc.addParameter(
"active", Boolean.FALSE,
true);
48 mc.addParameter(
"template",
"summary",
true);
54 if(macroCommand.itsMe(
"polls(")) {
55 StringWriter sw =
new StringWriter();
59 macroCommand.getParameterValue(Boolean.class,
"active"),
60 macroCommand.getParameterValue(Boolean.class,
"restricted"),
61 macroCommand.getParameterValue(Integer.class,
"count"),
63 macroCommand.getParameterValue(String.class,
"context"));
71 return writer.toString();
final List< MacroCommand > commands
void setSummaryTemplate(String summaryTemplate)
void setNavigatorTop(boolean navigatorTop)
void setNavigatorBottom(boolean navigatorBottom)
ContentRenderer loadCommand(MacroCommand macroCommand, IContact contact, String idContext)
ElephantContentProvider()
void setPublicOnly(boolean publicOnly)
static HeadlessApplication getInstance()
IConstructor getConstructor()