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

Public Member Functions

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

Constructor & Destructor Documentation

◆ PublicationContentProvider()

org.turro.publication.content.PublicationContentProvider.PublicationContentProvider ( )

Definition at line 38 of file PublicationContentProvider.java.

38  {
39  addCommands();
40  }

Member Function Documentation

◆ loadCommand()

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

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

Definition at line 57 of file PublicationContentProvider.java.

57  {
58  if(macroCommand.itsMe("publications(")) {
59  StringWriter sw = new StringWriter();
60  PublicationContentIterator pi = new PublicationContentIterator(
61  HeadlessApplication.getInstance().getConstructor(),
62  sw, contact, true,
63  macroCommand.getParameterValue(String.class, "context"));
64  pi.setGroupId(macroCommand.getParameterValue(Long.class, "groupId"));
65  pi.setCategoryId(macroCommand.getParameterValue(Long.class, "categoryId"));
66  pi.setPage(macroCommand.getParameterValue(Integer.class, "count"));
67  pi.setAllowAttachments(true);
68  pi.setAllowFiles(true);
69  pi.setAllowDescriptions(true);
70  pi.setAllowInterest(true);
71  pi.setAllowVotes(true);
72  pi.setAllowComments(true);
73  pi.setAllowPolls(true);
74  pi.setSummaryTemplate(macroCommand.getParameterValue(String.class, "template"));
75  pi.setLang(macroCommand.getParameterValue(String.class, "lang"));
76  pi.setNotSent(macroCommand.getParameterValue(Boolean.class, "notSent"));
77  pi.setBlogger(macroCommand.getParameterValue(Boolean.class, "asBlogger"));
78  pi.setFuture(macroCommand.getParameterValue(Boolean.class, "future"));
79  pi.setNavigatorTop(false);
80  pi.setNavigatorBottom(false);
81  pi.setSearchOption(false);
82  pi.load();
83  return new ContentRenderer(macroCommand, pi, sw, (IContentIterator iterator, Writer writer) -> {
84  iterator.render();
85  return writer.toString();
86  });
87  }
88  return null;
89  }
Here is the call graph for this function:

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