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

Public Member Functions

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

Constructor & Destructor Documentation

◆ FinancialsContentProvider()

org.turro.financials.content.FinancialsContentProvider.FinancialsContentProvider ( )

Definition at line 38 of file FinancialsContentProvider.java.

38  {
39  addCommands();
40  }

Member Function Documentation

◆ loadCommand()

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

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

Definition at line 55 of file FinancialsContentProvider.java.

55  {
56  if(macroCommand.itsMe("contracts(")) {
57  StringWriter sw = new StringWriter();
58  ContractContentIterator ci = new ContractContentIterator(
59  HeadlessApplication.getInstance().getConstructor(),
60  sw, contact, true,
61  macroCommand.getParameterValue(String.class, "context"));
62  if(macroCommand.getParameterValue(String.class, "status").equals("active")) {
63  ci.setStatus(1);
64  } else if(macroCommand.getParameterValue(String.class, "status").equals("closed")) {
65  ci.setStatus(2);
66  }
67  ci.setPage(macroCommand.getParameterValue(Integer.class, "count"));
68  ci.setAllowAttachments(true);
69  ci.setAllowFiles(true);
70  ci.setAllowDescriptions(true);
71  ci.setAllowInterest(true);
72  ci.setAllowVotes(true);
73  ci.setAllowComments(true);
74  ci.setAllowPolls(true);
75  ci.setSummaryTemplate(macroCommand.getParameterValue(String.class, "template"));
76  ci.setCheckParticipation(macroCommand.getParameterValue(Boolean.class, "intervention"));
77  ci.setType(macroCommand.getParameterValue(Integer.class, "type"));
78  ci.setNavigatorTop(false);
79  ci.setNavigatorBottom(false);
80  ci.load();
81  return new ContentRenderer(macroCommand, ci, sw, (IContentIterator iterator, Writer writer) -> {
82  iterator.render();
83  return writer.toString();
84  });
85  }
86  return null;
87  }
Here is the call graph for this function:

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