- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 35 of file Scripting.java.
◆ eval() [1/2]
static boolean org.turro.script.Scripting.eval |
( |
IContact |
contact, |
|
|
String |
value |
|
) |
| |
|
static |
Definition at line 41 of file Scripting.java.
42 return evalFor(contact,
null, value);
static boolean evalFor(Object entity, String value)
◆ eval() [2/2]
static boolean org.turro.script.Scripting.eval |
( |
String |
value | ) |
|
|
static |
◆ evalFor() [1/4]
Definition at line 57 of file Scripting.java.
58 if(Contacts.isValid(contact)) {
59 Script script = iee ==
null ? null : iee.getActorScript();
64 script.addVariable(
"user", contact);
65 return script.evalToBoolean(Scripting.realScript(value));
◆ evalFor() [2/4]
static boolean org.turro.script.Scripting.evalFor |
( |
IContact |
contact, |
|
|
Object |
entity, |
|
|
String |
value |
|
) |
| |
|
static |
◆ evalFor() [3/4]
static boolean org.turro.script.Scripting.evalFor |
( |
IElephantEntity |
iee, |
|
|
String |
value |
|
) |
| |
|
static |
◆ evalFor() [4/4]
static boolean org.turro.script.Scripting.evalFor |
( |
Object |
entity, |
|
|
String |
value |
|
) |
| |
|
static |
◆ instance()
static Script org.turro.script.Scripting.instance |
( |
| ) |
|
|
static |
Definition at line 92 of file Scripting.java.
93 Script script =
new Script();
94 script.addVariable(
"pfunc",
new ProfileFunctions());
95 Instances.cached().byAnnotation(ScriptingFunction.class, IScriptingFunction.class).forEach((iScript) -> {
96 iScript.addFunctions(script);
◆ realScript()
static String org.turro.script.Scripting.realScript |
( |
String |
script | ) |
|
|
static |
Definition at line 75 of file Scripting.java.
76 if(script.startsWith(
"file:")) {
77 return Scripting.scriptContent(script.substring(5));
◆ scriptContent()
static String org.turro.script.Scripting.scriptContent |
( |
String |
scriptName | ) |
|
|
static |
Definition at line 83 of file Scripting.java.
85 String file = ElephantContext.getRealPath(
SCRIPT_FOLDER +
"/" + scriptName);
86 return Document.from(file).content();
87 }
catch (IOException ex) {
static final String SCRIPT_FOLDER
◆ SCRIPT_FOLDER
final String org.turro.script.Scripting.SCRIPT_FOLDER = "/WEB-INF/elephant/scripts" |
|
static |
The documentation for this class was generated from the following file: