BrightSide Workbench Full Report + Source Code
org.turro.content.ElephantContentProvider Class Reference
Inheritance diagram for org.turro.content.ElephantContentProvider:
Collaboration diagram for org.turro.content.ElephantContentProvider:

Public Member Functions

 ElephantContentProvider ()
 
ContentRenderer loadCommand (MacroCommand macroCommand, IContact contact, String idContext)
 
- Public Member Functions inherited from org.turro.action.content.AbstractContentProvider
List< String > getHelpCommands ()
 
boolean itsMe (String command)
 
ContentRenderer loadCommand (String command, IContact contact, String idContext)
 
List< MacroCommand > getCommands ()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.action.content.AbstractContentProvider
final List< MacroCommand > commands = new ArrayList<>()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file ElephantContentProvider.java.

Constructor & Destructor Documentation

◆ ElephantContentProvider()

org.turro.content.ElephantContentProvider.ElephantContentProvider ( )

Definition at line 38 of file ElephantContentProvider.java.

38  {
39  addCommands();
40  }

Member Function Documentation

◆ loadCommand()

ContentRenderer org.turro.content.ElephantContentProvider.loadCommand ( MacroCommand  macroCommand,
IContact  contact,
String  idContext 
)

Reimplemented from org.turro.action.content.AbstractContentProvider.

Definition at line 53 of file ElephantContentProvider.java.

53  {
54  if(macroCommand.itsMe("polls(")) {
55  StringWriter sw = new StringWriter();
56  PollContentIterator di = new PollContentIterator(
57  HeadlessApplication.getInstance().getConstructor(),
58  sw, contact,
59  macroCommand.getParameterValue(Boolean.class, "active"),
60  macroCommand.getParameterValue(Boolean.class, "restricted"),
61  macroCommand.getParameterValue(Integer.class, "count"),
62  true,
63  macroCommand.getParameterValue(String.class, "context"));
64  di.setPublicOnly(true);
65  di.setSummaryTemplate(macroCommand.getParameterValue(String.class, "template"));
66  di.setNavigatorTop(false);
67  di.setNavigatorBottom(false);
68  di.load();
69  return new ContentRenderer(macroCommand, di, sw, (IContentIterator iterator, Writer writer) -> {
70  iterator.render();
71  return writer.toString();
72  });
73  }
74  return null;
75  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: