1 15 package org.apache.tapestry.script; 16 17 import java.util.Map ; 18 19 import org.apache.hivemind.Location; 20 import org.apache.hivemind.Resource; 21 import org.apache.tapestry.IRequestCycle; 22 import org.apache.tapestry.IScript; 23 import org.apache.tapestry.IScriptProcessor; 24 import org.apache.tapestry.coerce.ValueConverter; 25 import org.apache.tapestry.services.ExpressionEvaluator; 26 27 33 34 public class ParsedScript extends AbstractToken implements IScript 35 { 36 private Resource _scriptResource; 37 38 private ExpressionEvaluator _evaluator; 39 40 41 42 private ValueConverter _valueConverter; 43 44 public ParsedScript(ExpressionEvaluator evaluator, ValueConverter valueConverter, 45 Location location) 46 { 47 super(location); 48 49 _evaluator = evaluator; 50 _valueConverter = valueConverter; 51 _scriptResource = location.getResource(); 52 } 53 54 public Resource getScriptResource() 55 { 56 return _scriptResource; 57 } 58 59 63 public void execute(IRequestCycle cycle, IScriptProcessor processor, Map symbols) 64 { 65 ScriptSession session = new ScriptSessionImpl(_scriptResource, cycle, processor, 66 _evaluator, _valueConverter, symbols); 67 68 writeChildren(null, session); 69 } 70 71 74 public void write(StringBuffer buffer, ScriptSession session) 75 { 76 77 } 78 79 } | Popular Tags |