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
ScriptSessionImpl and 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()
IScript
getScriptResource
in interface IScript
public void execute(IRequestCycle cycle, IScriptProcessor processor, java.util.Map symbols)
ScriptSessionImpl
and invokes
AbstractToken.writeChildren(java.lang.StringBuffer, org.apache.tapestry.script.ScriptSession)
.execute
in interface IScript
cycle
- the current request cycleprocessor
- an object that processes the results of the script, typically
an instance of Body
symbols
- 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 IScriptToken
public org.apache.hivemind.Location getLocation()
getLocation
in interface org.apache.hivemind.Locatable
public void addToken(IScriptToken token)
IScriptToken
addToken
in interface IScriptToken
protected 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)