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

Public Member Functions

 ChallengeContentProvider ()
 
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 ChallengeContentProvider.java.

Constructor & Destructor Documentation

◆ ChallengeContentProvider()

org.turro.students.content.ChallengeContentProvider.ChallengeContentProvider ( )

Definition at line 38 of file ChallengeContentProvider.java.

38  {
39  addCommands();
40  }

Member Function Documentation

◆ loadCommand()

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

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

Definition at line 58 of file ChallengeContentProvider.java.

58  {
59  if(macroCommand.itsMe("challenges(")) {
60  StringWriter sw = new StringWriter();
61  ChallengeContentIterator ci = new ChallengeContentIterator(
62  HeadlessApplication.getInstance().getConstructor(),
63  sw, contact, true,
64  macroCommand.getParameterValue(String.class, "context"));
65  ci.setStatus(macroCommand.getParameterValue(String.class, "status"));
66  ci.setPage(macroCommand.getParameterValue(Integer.class, "count"));
67  ci.setAllowAttachments(true);
68  ci.setAllowFiles(true);
69  ci.setAllowDescriptions(true);
70  ci.setAllowInterest(true);
71  ci.setAllowVotes(true);
72  ci.setAllowComments(true);
73  ci.setAllowPolls(true);
74  ci.setSummaryTemplate(macroCommand.getParameterValue(String.class, "template"));
75  ci.setRestricted(macroCommand.getParameterValue(Boolean.class, "restricted"));
76  ci.setStudentRelated(macroCommand.getParameterValue(Boolean.class, "studentRelated"));
77  ci.setChallengerRelated(macroCommand.getParameterValue(Boolean.class, "challengerRelated"));
78  ci.setResponseFrom(macroCommand.getParameterValue(Integer.class, "responseFrom"));
79  ci.setNavigatorTop(false);
80  ci.setNavigatorBottom(false);
81  ci.load();
82  return new ContentRenderer(macroCommand, ci, sw, (IContentIterator iterator, Writer writer) -> {
83  iterator.render();
84  return writer.toString();
85  });
86  }
87  return null;
88  }
Here is the call graph for this function:

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