BrightSide Workbench Full Report + Source Code
org.turro.parser.processor.MacroProcessorContext Class Reference

Public Member Functions

 MacroProcessorContext (IConstructor constructor, Writer writer, IContact contact, MacroAdapter macro)
 
IConstructor getConstructor ()
 
Writer getWriter ()
 
IContact getContact ()
 
MacroAdapter getMacro ()
 
ElephantMarker getMarker ()
 
void write (String value)
 
String getContextPath (boolean full)
 
String getTemplateRoot ()
 
String getTemplate ()
 
boolean isNavigation ()
 
int getPage ()
 
boolean isRestricted ()
 
boolean isRanking ()
 
boolean isMatching ()
 

Detailed Description

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

Definition at line 34 of file MacroProcessorContext.java.

Constructor & Destructor Documentation

◆ MacroProcessorContext()

org.turro.parser.processor.MacroProcessorContext.MacroProcessorContext ( IConstructor  constructor,
Writer  writer,
IContact  contact,
MacroAdapter  macro 
)

Definition at line 43 of file MacroProcessorContext.java.

43  {
44  this.constructor = constructor;
45  this.writer = writer;
46  this.contact = contact;
47  this.macro = macro;
48  }

Member Function Documentation

◆ getConstructor()

IConstructor org.turro.parser.processor.MacroProcessorContext.getConstructor ( )

Definition at line 50 of file MacroProcessorContext.java.

50  {
51  return constructor;
52  }
Here is the caller graph for this function:

◆ getContact()

IContact org.turro.parser.processor.MacroProcessorContext.getContact ( )

Definition at line 58 of file MacroProcessorContext.java.

58  {
59  if(contact != null) {
60  return contact;
61  } else if(constructor != null) {
62  return constructor.getUser();
63  } else {
64  return null;
65  }
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getContextPath()

String org.turro.parser.processor.MacroProcessorContext.getContextPath ( boolean  full)

Definition at line 87 of file MacroProcessorContext.java.

87  {
88  return (full ? ElephantContext.getRootWebPath() : "") +
89  Optional.ofNullable(macro.get("context"))
90  .orElse(getCurrentContextPath());
91  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMacro()

MacroAdapter org.turro.parser.processor.MacroProcessorContext.getMacro ( )

Definition at line 68 of file MacroProcessorContext.java.

68  {
69  return macro;
70  }
Here is the caller graph for this function:

◆ getMarker()

ElephantMarker org.turro.parser.processor.MacroProcessorContext.getMarker ( )

Definition at line 72 of file MacroProcessorContext.java.

72  {
73  if(marker == null) {
74  marker = new ElephantMarker(constructor);
75  }
76  return marker;
77  }
Here is the caller graph for this function:

◆ getPage()

int org.turro.parser.processor.MacroProcessorContext.getPage ( )

Definition at line 105 of file MacroProcessorContext.java.

105  {
106  return macro.get(Integer.class, "count");
107  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTemplate()

String org.turro.parser.processor.MacroProcessorContext.getTemplate ( )

Definition at line 97 of file MacroProcessorContext.java.

97  {
98  return macro.get("template");
99  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.parser.processor.MacroProcessorContext.getTemplateRoot ( )

Definition at line 93 of file MacroProcessorContext.java.

93  {
94  return macro.get("tmpl-root");
95  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWriter()

Writer org.turro.parser.processor.MacroProcessorContext.getWriter ( )

Definition at line 54 of file MacroProcessorContext.java.

54  {
55  return writer;
56  }
Here is the caller graph for this function:

◆ isMatching()

boolean org.turro.parser.processor.MacroProcessorContext.isMatching ( )

Definition at line 117 of file MacroProcessorContext.java.

117  {
118  return macro.get(Boolean.class, "matching", false);
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNavigation()

boolean org.turro.parser.processor.MacroProcessorContext.isNavigation ( )

Definition at line 101 of file MacroProcessorContext.java.

101  {
102  return macro.get(Boolean.class, "navigation", true);
103  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRanking()

boolean org.turro.parser.processor.MacroProcessorContext.isRanking ( )

Definition at line 113 of file MacroProcessorContext.java.

113  {
114  return macro.get(Boolean.class, "ranking", false);
115  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRestricted()

boolean org.turro.parser.processor.MacroProcessorContext.isRestricted ( )

Definition at line 109 of file MacroProcessorContext.java.

109  {
110  return macro.get(Boolean.class, "restricted", false);
111  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void org.turro.parser.processor.MacroProcessorContext.write ( String  value)

Definition at line 79 of file MacroProcessorContext.java.

79  {
80  try {
81  writer.write(value);
82  } catch (IOException ex) {
83  WebLoggers.info(this).exception(ex).log();
84  }
85  }
Here is the call graph for this function:
Here is the caller graph for this function:

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