public class ParsedScript extends java.lang.Object implements IScript
script tokens.| Constructor and Description |
|---|
ParsedScript(ExpressionEvaluator evaluator,
ValueConverter valueConverter,
org.apache.hivemind.Location location) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToken(IScriptToken token)
Invoked during parsing to add the token parameter as a child
of this token.
|
protected java.lang.Object |
evaluate(java.lang.String expression,
ScriptSession session)
Evaluates the expression against the session's symbols, using
ExpressionEvaluator#read(Object, String)and returns the result. |
protected boolean |
evaluateBoolean(java.lang.String expression,
ScriptSession session)
Evaluates an expression and coerces the result to a boolean.
|
void |
execute(IRequestCycle cycle,
IScriptProcessor processor,
java.util.Map symbols)
Creates the
ScriptSessionImpland invokes
AbstractToken.writeChildren(java.lang.StringBuffer, org.apache.tapestry.script.ScriptSession). |
org.apache.hivemind.Location |
getLocation() |
org.apache.hivemind.Resource |
getScriptResource()
Returns the location from which the script was loaded.
|
void |
write(java.lang.StringBuffer buffer,
ScriptSession session)
Does nothing; never invoked.
|
protected void |
writeChildren(java.lang.StringBuffer buffer,
ScriptSession session)
Invokes
IScriptToken.write(StringBuffer,ScriptSession)on each child token (if there
are any). |
public ParsedScript(ExpressionEvaluator evaluator, ValueConverter valueConverter, org.apache.hivemind.Location location)
public org.apache.hivemind.Resource getScriptResource()
IScriptgetScriptResource in interface IScriptpublic void execute(IRequestCycle cycle, IScriptProcessor processor, java.util.Map symbols)
ScriptSessionImpland invokes
AbstractToken.writeChildren(java.lang.StringBuffer, org.apache.tapestry.script.ScriptSession).execute in interface IScriptcycle - the current request cycleprocessor - an object that processes the results of the script, typically
an instance of Bodysymbols - Map of input symbols; execution of the script may modify the map,
creating new output symbolsTapestryUtils#getPageRenderSupport(IRequestCycle, Object)public void write(java.lang.StringBuffer buffer, ScriptSession session)
write in interface IScriptTokenpublic org.apache.hivemind.Location getLocation()
getLocation in interface org.apache.hivemind.Locatablepublic void addToken(IScriptToken token)
IScriptTokenaddToken in interface IScriptTokenprotected void writeChildren(java.lang.StringBuffer buffer, ScriptSession session)
IScriptToken.write(StringBuffer,ScriptSession)on each child token (if there
are any).protected java.lang.Object evaluate(java.lang.String expression, ScriptSession session)
ExpressionEvaluator#read(Object, String)and returns the result.protected boolean evaluateBoolean(java.lang.String expression, ScriptSession session)