BrightSide Workbench Full Report + Source Code
org.turro.parser.processor.ContentProcessor Class Reference
Inheritance diagram for org.turro.parser.processor.ContentProcessor:
Collaboration diagram for org.turro.parser.processor.ContentProcessor:

Public Member Functions

String getName ()
 
- Public Member Functions inherited from org.turro.parser.processor.AbstractMacroProcessor
 AbstractMacroProcessor ()
 
MacroMap getMacros ()
 
Macro getMacro (String name)
 
void process (MacroProcessorContext context)
 

Protected Member Functions

void doProcess (MacroProcessorContext context)
 
void explainMacros (MacroMap macros)
 
- Protected Member Functions inherited from org.turro.parser.processor.AbstractMacroProcessor
void prepareProperties (ElephantMarker marker, String properties)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.parser.processor.AbstractMacroProcessor
MacroMap macros = new MacroMap()
 

Detailed Description

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

Definition at line 31 of file ContentProcessor.java.

Member Function Documentation

◆ doProcess()

void org.turro.parser.processor.ContentProcessor.doProcess ( MacroProcessorContext  context)
protected

Reimplemented from org.turro.parser.processor.AbstractMacroProcessor.

Definition at line 39 of file ContentProcessor.java.

39  {
40  final MacroAdapter macro = context.getMacro();
41  switch(context.getMacro().getName()) {
42  case "folder" -> {
43  ElephantMarker marker = context.getMarker();
44  marker.put("folder", Folder.from(ElephantContext.getRealPath(macro.get("path"))));
45  marker.put("filter", macro.get("filter"));
46  marker.put("role", macro.get("role"));
47  marker.process(context.getTemplateRoot(), context.getTemplate(), context.getWriter());
48  }
49  };
50  }
Here is the call graph for this function:

◆ explainMacros()

void org.turro.parser.processor.ContentProcessor.explainMacros ( MacroMap  macros)
protected

Reimplemented from org.turro.parser.processor.AbstractMacroProcessor.

Definition at line 53 of file ContentProcessor.java.

53  {
54  macros.addMacro("folder")
55  .addParameter(MacroParameter.required("path"))
56  .addParameter(MacroParameter.optional("filter", "*.*"))
57  .addParameter(MacroParameter.optional("role", null))
58  .addTemplate("files", "folder");
59  }

◆ getName()

String org.turro.parser.processor.ContentProcessor.getName ( )

Reimplemented from org.turro.parser.processor.AbstractMacroProcessor.

Definition at line 34 of file ContentProcessor.java.

34  {
35  return "Content";
36  }

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