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

Public Member Functions

String compile (String wiki)
 
String wiki (String wiki)
 
String trunc (String text, int max)
 
String html (String html, int max)
 
String htmlPlain (String html, int max)
 
String reduce (long value)
 
long expand (String value)
 
String i (String value)
 
String i (String value, int count)
 
String f (String value, Object... arguments)
 
String root ()
 
Configurator configurator ()
 
String cfgs (String key)
 
Integer cfgi (String key)
 
Long cfgl (String key)
 
Double cfgd (String key)
 
Boolean cfgb (String key)
 
String getName ()
 

Static Public Member Functions

static boolean isActor (String actor)
 
static boolean isActor (IContact contact, String actor)
 
static boolean isActorFor (Object entity, String actor)
 
static boolean isActorFor (IContact contact, Object entity, String actor)
 
static boolean isActorFor (IElephantEntity iee, String actor)
 
static boolean isActorFor (IContact contact, IElephantEntity iee, String actor)
 
static boolean eval (String value)
 
static boolean eval (IContact contact, String value)
 
static boolean evalFor (Object entity, String value)
 
static boolean evalFor (IContact contact, Object entity, String value)
 
static boolean evalFor (IElephantEntity iee, String value)
 
static boolean evalFor (IContact contact, IElephantEntity iee, String value)
 

Detailed Description

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

Definition at line 41 of file ParserHelper.java.

Member Function Documentation

◆ cfgb()

Boolean org.turro.parser.ParserHelper.cfgb ( String  key)

Definition at line 119 of file ParserHelper.java.

119  {
120  return Configurator.instance().asBoolean(key);
121  }

◆ cfgd()

Double org.turro.parser.ParserHelper.cfgd ( String  key)

Definition at line 115 of file ParserHelper.java.

115  {
116  return Configurator.instance().asDouble(key);
117  }

◆ cfgi()

Integer org.turro.parser.ParserHelper.cfgi ( String  key)

Definition at line 107 of file ParserHelper.java.

107  {
108  return Configurator.instance().asInteger(key);
109  }

◆ cfgl()

Long org.turro.parser.ParserHelper.cfgl ( String  key)

Definition at line 111 of file ParserHelper.java.

111  {
112  return Configurator.instance().asLong(key);
113  }

◆ cfgs()

String org.turro.parser.ParserHelper.cfgs ( String  key)

Definition at line 103 of file ParserHelper.java.

103  {
104  return Configurator.instance().asString(key);
105  }

◆ compile()

String org.turro.parser.ParserHelper.compile ( String  wiki)

Definition at line 45 of file ParserHelper.java.

45  {
46  return new Parser("$wiki\n" + wiki).simpleParse();
47  }
String wiki(String wiki)
Here is the call graph for this function:

◆ configurator()

Configurator org.turro.parser.ParserHelper.configurator ( )

Definition at line 99 of file ParserHelper.java.

99  {
100  return Configurator.instance();
101  }

◆ eval() [1/2]

static boolean org.turro.parser.ParserHelper.eval ( IContact  contact,
String  value 
)
static

Definition at line 155 of file ParserHelper.java.

155  {
156  return Scripting.eval(contact, value);
157  }
Here is the call graph for this function:

◆ eval() [2/2]

static boolean org.turro.parser.ParserHelper.eval ( String  value)
static

Definition at line 151 of file ParserHelper.java.

151  {
152  return Scripting.eval(value);
153  }
Here is the call graph for this function:

◆ evalFor() [1/4]

static boolean org.turro.parser.ParserHelper.evalFor ( IContact  contact,
IElephantEntity  iee,
String  value 
)
static

Definition at line 171 of file ParserHelper.java.

171  {
172  return Scripting.evalFor(contact, iee, value);
173  }
Here is the call graph for this function:

◆ evalFor() [2/4]

static boolean org.turro.parser.ParserHelper.evalFor ( IContact  contact,
Object  entity,
String  value 
)
static

Definition at line 163 of file ParserHelper.java.

163  {
164  return Scripting.evalFor(contact, entity, value);
165  }
Here is the call graph for this function:

◆ evalFor() [3/4]

static boolean org.turro.parser.ParserHelper.evalFor ( IElephantEntity  iee,
String  value 
)
static

Definition at line 167 of file ParserHelper.java.

167  {
168  return Scripting.evalFor(iee, value);
169  }
Here is the call graph for this function:

◆ evalFor() [4/4]

static boolean org.turro.parser.ParserHelper.evalFor ( Object  entity,
String  value 
)
static

Definition at line 159 of file ParserHelper.java.

159  {
160  return Scripting.evalFor(entity, value);
161  }
Here is the call graph for this function:

◆ expand()

long org.turro.parser.ParserHelper.expand ( String  value)

Definition at line 73 of file ParserHelper.java.

73  {
74  return NumberReducer.expand(value);
75  }

◆ f()

String org.turro.parser.ParserHelper.f ( String  value,
Object...  arguments 
)

Definition at line 87 of file ParserHelper.java.

87  {
88  return I_.format(value, arguments);
89  }
Here is the call graph for this function:

◆ getName()

String org.turro.parser.ParserHelper.getName ( )

Implements org.turro.marker.IElephantHelper.

Definition at line 178 of file ParserHelper.java.

178  {
179  return "parser";
180  }

◆ html()

String org.turro.parser.ParserHelper.html ( String  html,
int  max 
)

Definition at line 59 of file ParserHelper.java.

59  {
60  return HtmlContent.truncate(html, max);
61  }
String html(String html, int max)
Here is the caller graph for this function:

◆ htmlPlain()

String org.turro.parser.ParserHelper.htmlPlain ( String  html,
int  max 
)

Definition at line 63 of file ParserHelper.java.

63  {
64  return HtmlContent.plain(html, max);
65  }
Here is the call graph for this function:

◆ i() [1/2]

String org.turro.parser.ParserHelper.i ( String  value)

Definition at line 79 of file ParserHelper.java.

79  {
80  return I_.get(value);
81  }
Here is the call graph for this function:

◆ i() [2/2]

String org.turro.parser.ParserHelper.i ( String  value,
int  count 
)

Definition at line 83 of file ParserHelper.java.

83  {
84  return I_.get(value, count);
85  }
Here is the call graph for this function:

◆ isActor() [1/2]

static boolean org.turro.parser.ParserHelper.isActor ( IContact  contact,
String  actor 
)
static

Definition at line 129 of file ParserHelper.java.

129  {
130  return Actors.isActor(contact, actor);
131  }
Here is the call graph for this function:

◆ isActor() [2/2]

static boolean org.turro.parser.ParserHelper.isActor ( String  actor)
static

Definition at line 125 of file ParserHelper.java.

125  {
126  return Actors.isActor(actor);
127  }
Here is the call graph for this function:

◆ isActorFor() [1/4]

static boolean org.turro.parser.ParserHelper.isActorFor ( IContact  contact,
IElephantEntity  iee,
String  actor 
)
static

Definition at line 145 of file ParserHelper.java.

145  {
146  return Actors.isActorFor(contact, iee, actor);
147  }
Here is the call graph for this function:

◆ isActorFor() [2/4]

static boolean org.turro.parser.ParserHelper.isActorFor ( IContact  contact,
Object  entity,
String  actor 
)
static

Definition at line 137 of file ParserHelper.java.

137  {
138  return Actors.isActorFor(contact, entity, actor);
139  }
Here is the call graph for this function:

◆ isActorFor() [3/4]

static boolean org.turro.parser.ParserHelper.isActorFor ( IElephantEntity  iee,
String  actor 
)
static

Definition at line 141 of file ParserHelper.java.

141  {
142  return Actors.isActorFor(iee, actor);
143  }
Here is the call graph for this function:

◆ isActorFor() [4/4]

static boolean org.turro.parser.ParserHelper.isActorFor ( Object  entity,
String  actor 
)
static

Definition at line 133 of file ParserHelper.java.

133  {
134  return Actors.isActorFor(entity, actor);
135  }
Here is the call graph for this function:

◆ reduce()

String org.turro.parser.ParserHelper.reduce ( long  value)

Definition at line 69 of file ParserHelper.java.

69  {
70  return NumberReducer.reduce(value);
71  }

◆ root()

String org.turro.parser.ParserHelper.root ( )

Definition at line 93 of file ParserHelper.java.

93  {
94  return ElephantContext.getRootWebPath();
95  }
Here is the call graph for this function:

◆ trunc()

String org.turro.parser.ParserHelper.trunc ( String  text,
int  max 
)

Definition at line 55 of file ParserHelper.java.

55  {
56  return Strings.truncate(text, max);
57  }

◆ wiki()

String org.turro.parser.ParserHelper.wiki ( String  wiki)

Definition at line 49 of file ParserHelper.java.

49  {
50  return WikiCompiler.preview(wiki).html();
51  }
Here is the caller graph for this function:

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