19 package org.turro.contacts.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(
"convocations");
44 mc.addParameter(
"context",
"",
true);
45 mc.addParameter(
"count", Integer.valueOf(10),
true);
46 mc.addParameter(
"template",
"summary",
true);
47 mc.addParameter(
"restricted", Boolean.TRUE,
true);
48 mc.addParameter(
"public", Boolean.FALSE,
true);
49 mc.addParameter(
"future", Boolean.TRUE,
true);
55 if(macroCommand.itsMe(
"convocations(")) {
56 StringWriter sw =
new StringWriter();
60 macroCommand.getParameterValue(String.class,
"context"));
61 pi.
setPage(macroCommand.getParameterValue(Integer.class,
"count"));
70 pi.
setMode(macroCommand.getParameterValue(Boolean.class,
"future") ?
"open" :
null);
71 pi.
setRestricted(macroCommand.getParameterValue(Boolean.class,
"restricted"));
72 pi.
setPublishable(macroCommand.getParameterValue(Boolean.class,
"public"));
79 return writer.toString();
final List< MacroCommand > commands
void setMode(String mode)
void setPublishable(boolean publishable)
ContentRenderer loadCommand(MacroCommand macroCommand, IContact contact, String idContext)
ConvocationContentProvider()
static HeadlessApplication getInstance()
IConstructor getConstructor()
void setAllowAttachments(boolean allowAttachments)
void setAllowInterest(boolean allowInterest)
void setAllowDescriptions(boolean allowDescriptions)
void setRestricted(boolean restricted)
void setAllowComments(boolean allowComments)
void setNavigatorBottom(boolean navigatorBottom)
void setSearchOption(boolean searchOption)
void setSummaryTemplate(String summaryTemplate)
void setNavigatorTop(boolean navigatorTop)
void setAllowVotes(boolean allowVotes)
void setAllowFiles(boolean allowFiles)
void setAllowPolls(boolean allowPolls)